Skip to content

Commit c5abbd8

Browse files
ci: use semantic release to publish version
1 parent 6972f38 commit c5abbd8

File tree

6 files changed

+2945
-935
lines changed

6 files changed

+2945
-935
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,42 @@ jobs:
2424
run: yarn lint
2525

2626
- name: Run tests
27-
run: yarn test --verbose
27+
run: yarn test:cov
28+
29+
- name: Upload coverage reports to Codecov
30+
uses: codecov/codecov-action@v2
31+
32+
- name: Release dry-run
33+
run: yarn release:test
34+
env:
35+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
release:
39+
if: github.ref == 'refs/heads/master'
40+
needs: [test]
41+
runs-on: ubuntu-latest
42+
name: Release
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- name: Use latest Node.js
47+
uses: actions/setup-node@v3
48+
with:
49+
node-version: 'latest'
50+
cache: 'yarn'
51+
52+
- name: Install dependencies
53+
run: yarn install
54+
55+
- name: Configure CI Git User
56+
run: |
57+
git config --global user.email [email protected]
58+
git config --global user.name josex2r
59+
60+
- name: Release
61+
run: yarn release
62+
env:
63+
HUSKY: 0
64+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
65+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
"@semantic-release/npm",
7+
"@semantic-release/git",
8+
"@semantic-release/github"
9+
]
10+
}

0 commit comments

Comments
 (0)