Skip to content

Commit 12eaf49

Browse files
committed
Add workflow
1 parent 8c89463 commit 12eaf49

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Diff for: .github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# Checkout project repository
12+
- name: Check out code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 2
16+
17+
# Setup Node.js environment
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
registry-url: https://registry.npmjs.org/
22+
node-version: 20
23+
cache: 'yarn'
24+
25+
# Install dependencies
26+
- name: Install dependencies
27+
run: yarn --frozen-lockfile
28+
29+
# Make sure the package builds
30+
- name: Build
31+
run: yarn build
32+
33+
# Upload the build to artifacts for inspection/troubleshooting
34+
- name: Upload build artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: dist
38+
path: dist/
39+
40+
# Publish version to public repository
41+
- name: Publish
42+
run: yarn publish --access=public
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)