-
Notifications
You must be signed in to change notification settings - Fork 24
43 lines (39 loc) · 1.17 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Release
on:
workflow_dispatch:
env:
NODE_VERSION: 20
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Configure pnpm
run: |
pnpm config set registry https://registry.npmjs.org
pnpm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare release
run: pnpm semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish packages
if: github.ref == 'refs/heads/main'
run: pnpm publish -r
- name: Publish packages (beta)
if: github.ref == 'refs/heads/beta'
run: pnpm publish -r --tag beta --publish-branch beta