We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a357383 commit 9a86d35Copy full SHA for 9a86d35
.github/workflows/publish_github_package.yml
@@ -0,0 +1,40 @@
1
+name: Publish GitHub package
2
+
3
+on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [created]
7
8
+jobs:
9
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
17
+ - name: Use Node.js
18
+ uses: actions/setup-node@v4
19
20
+ node-version: 20
21
+ registry-url: 'https://registry.npmjs.org'
22
+ cache: 'npm'
23
24
+ - name: Install dependencies
25
+ run: npm ci
26
27
+ - name: Set version to release tag
28
+ shell: bash
29
+ id: define_tag
30
+ run: |
31
+ PACKAGE_VERSION=$(git describe --abbrev=0 --tags | sed 's/^v//')
32
+ echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
33
34
+ - name: Build
35
+ run: npm run build
36
37
+ - name: Publish
38
+ run: npm publish
39
+ env:
40
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
0 commit comments