File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on : workflow_dispatch
3
+
4
+ jobs :
5
+ release :
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - name : Check out repository code
9
+ uses : actions/checkout@v3
10
+ with :
11
+ fetch-depth : 0
12
+ ref : main
13
+ token : ${{ secrets.GIT_ACCESS_TOKEN }}
14
+ - uses : actions/setup-node@v3
15
+ with :
16
+ node-version : 16
17
+ registry-url : https://registry.npmjs.org/
18
+ - name : Configure git
19
+ run : |
20
+ git config user.name "github-actions[bot]"
21
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
22
+ - run : npm ci
23
+ - run : npm run test:coverage
24
+ - run : NODE_ENV=production npm run build
25
+ - name : Generating coverage badges
26
+ uses : jpb06/jest-badges-action@latest
27
+ with :
28
+ branches : main
29
+ no-commit : true
30
+ - run : git add badges
31
+ - run : npm run version:bump -- --first-release
32
+ - name : Push to GitHub
33
+ run : |
34
+ git push -f
35
+ git push --tags
36
+ echo "TAG_NAME=$(git describe)" >> "$GITHUB_ENV"
37
+ - name : Publish to NPM
38
+ run : npm publish
39
+ env :
40
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
41
+ - name : GitHub release
42
+ uses : softprops/action-gh-release@v1
43
+ with :
44
+ draft : false
45
+ body_path : CHANGELOG.md
46
+ name : ${{env.TAG_NAME}}
47
+ tag_name : ${{env.TAG_NAME}}
You can’t perform that action at this time.
0 commit comments