Skip to content

Commit 09b0bbd

Browse files
authored
ci: Add release script (#60)
The release script does not _actually_ publish anything, yet.
1 parent 0aaf30b commit 09b0bbd

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release-npm.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release to NPM
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
publish-npm:
11+
runs-on: ubuntu-latest
12+
environment: npm
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
registry-url: https://registry.npmjs.org/
20+
21+
- name: run tests
22+
run: |
23+
npm ci
24+
npm run lint
25+
npm run build
26+
npm run test:all
27+
28+
- name: Get Version
29+
id: package-version
30+
uses: martinbeentjes/[email protected]
31+
32+
- name: Parse Changelog
33+
id: parse-changelog
34+
uses: schwma/[email protected]
35+
with:
36+
version: '${{ steps.package-version.outputs.current-version }}'
37+
38+
# - name: Create a GitHub release
39+
# uses: ncipollo/release-action@v1
40+
# with:
41+
# tag: 'v${{ steps.package-version.outputs.current-version }}'
42+
# body: '${{ steps.parse-changelog.outputs.body }}'
43+
44+
- run: npm publish --access public --dry
45+
env:
46+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)