We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f2fcb3 commit 887577dCopy full SHA for 887577d
.github/workflows/release.yml
@@ -0,0 +1,35 @@
1
+name: Release
2
+
3
+on:
4
+ release:
5
+ types: [created]
6
7
+jobs:
8
+ npm:
9
+ name: NPM
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Setup Node.js
15
+ uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 22
18
+ registry-url: "https://registry.npmjs.org"
19
+ - name: Install dependencies
20
+ run: npm ci
21
+ - name: Determine NPM tag
22
+ id: npm-tag
23
+ run: |
24
+ version="${{ github.ref_name }}"
25
+ major_version=$(echo "$version" | cut -d. -f1)
26
27
+ if [ "$major_version" = "13" ]; then
28
+ echo "tag=legacy" >> $GITHUB_ENV
29
+ else
30
+ echo "tag=latest" >> $GITHUB_ENV
31
+ fi
32
+ - name: Publish to NPM
33
+ run: npm publish --tag ${{ env.tag }}
34
+ env:
35
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments