Skip to content

Commit 831167a

Browse files
committed
feat: automated release
1 parent 8a5d813 commit 831167a

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: Build
12
on:
23
push:
34
jobs:
@@ -26,6 +27,55 @@ jobs:
2627
- uses: stefanzweifel/git-auto-commit-action@v4
2728
with:
2829
commit_message: "chore: automated compilation"
30+
release:
31+
runs-on: ubuntu-latest
32+
needs: code
33+
steps:
34+
- uses: actions/checkout@v2
35+
- id: changelog
36+
uses: TriPSs/[email protected]
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
- uses: actions/create-release@v1
40+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ steps.changelog.outputs.tag }}
45+
release_name: ${{ steps.changelog.outputs.tag }}
46+
body: ${{ steps.changelog.outputs.clean_changelog }}
47+
npm-registry:
48+
runs-on: ubuntu-latest
49+
needs: release
50+
steps:
51+
- uses: actions/checkout@v2
52+
- uses: actions/setup-node@v2
53+
with:
54+
node-version: '16.8.x'
55+
registry-url: 'https://registry.npmjs.org'
56+
- run: npm install
57+
- run: npm publish
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
61+
gh-registry:
62+
runs-on: ubuntu-latest
63+
needs: release
64+
permissions:
65+
contents: read
66+
packages: write
67+
steps:
68+
- uses: actions/checkout@v2
69+
- uses: actions/setup-node@v2
70+
with:
71+
node-version: '12.x'
72+
registry-url: 'https://npm.pkg.github.com'
73+
scope: '@resetercss'
74+
- run: npm install
75+
- run: npm publish
76+
env:
77+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
2979
wiki:
3080
runs-on: ubuntu-latest
3181
steps:
@@ -34,4 +84,3 @@ jobs:
3484
run: |
3585
git remote add wiki https://github.com/resetercss/reseter.css.wiki.git
3686
git subtree push --prefix docs wiki main
37-

0 commit comments

Comments
 (0)