Skip to content

Commit c6695f9

Browse files
committed
Fix release flow (#79)
1 parent a5b41be commit c6695f9

File tree

2 files changed

+30
-44
lines changed

2 files changed

+30
-44
lines changed

.github/workflows/release_github.yaml renamed to .github/workflows/release_github_and_npmjs.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release_github
1+
name: release_github_and_npmjs
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
release:
12+
check:
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: write
@@ -34,8 +34,36 @@ jobs:
3434
else
3535
echo "changed=true" >> "${GITHUB_OUTPUT}"
3636
fi
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
40+
release:
41+
runs-on: ubuntu-latest
42+
needs:
43+
- check
44+
if: ${{ jobs.check.outputs.changed == 'true' }}
45+
permissions:
46+
contents: read
47+
id-token: write
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v5
51+
- name: Setup Node
52+
uses: actions/setup-node@v5
53+
with:
54+
node-version: 24
55+
- name: Update npm
56+
run: npm install -g npm@latest
57+
- name: Install
58+
run: npm install
59+
- name: Check
60+
run: npm run check
3761
- name: Create Release to GitHub
3862
if: ${{ steps.check.outputs.changed == 'true' }}
3963
run: gh release create "v$(jq -r '.version' package.json)" --generate-notes
4064
env:
4165
GH_TOKEN: ${{ github.token }}
66+
- name: Publish to npmjs.com
67+
run: |
68+
npm run build
69+
npm publish

.github/workflows/release_npmjs.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)