Skip to content

Commit 0ef0d89

Browse files
authored
chore: added release workflow
1 parent 56a18d7 commit 0ef0d89

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
checks:
7+
uses: ./.github/workflows/ci.yml
8+
9+
release:
10+
needs: checks
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: write
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
- run: corepack enable
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 22
22+
cache: 'pnpm'
23+
- name: Install dependencies
24+
run: pnpm install
25+
- name: Set publishing config
26+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
27+
env:
28+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
29+
- name: Tag and Release
30+
run: |
31+
git config --global user.email "[email protected]"
32+
git config --global user.name "GitHub Action"
33+
pnpm ci:version
34+
git add .
35+
git commit -m "chore(release): publish"
36+
pnpm ci:tag
37+
pnpm ci:publish
38+
git push && git push --tags
39+
env:
40+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
41+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
42+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)