Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit 4a50cbb

Browse files
committed
Automate releases
1 parent 5097453 commit 4a50cbb

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ jobs:
1515
- run: npm ci
1616
- run: npx eslint .
1717

18+
pack:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
- run: npm ci
26+
- run: npm pack
27+
- uses: actions/upload-artifact@v3
28+
with:
29+
name: package
30+
path: '*.tgz'
31+
1832
test:
1933
runs-on: ubuntu-latest
2034
continue-on-error: true
@@ -52,3 +66,18 @@ jobs:
5266
node-version: 18
5367
- run: npm ci
5468
- run: npx tsc
69+
70+
release:
71+
runs-on: ubuntu-latest
72+
needs: [eslint, test, pack, prettier, tsc]
73+
if: startsWith(github.ref, 'refs/tags/')
74+
steps:
75+
- uses: actions/setup-node@v3
76+
with:
77+
node-version: 18
78+
registry-url: https://registry.npmjs.org
79+
- uses: actions/download-artifact@v3
80+
with: { name: package }
81+
- run: npm publish *.tgz
82+
env:
83+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)