-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.3 KB
/
workflow.release.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
permissions:
pull-requests: write
contents: write
id-token: write
on:
workflow_call:
push:
branches:
- main
- alpha
- beta
- canary
- pre/rc
jobs:
release:
runs-on: ubuntu-latest
if: |
(
github.event_name == 'push' &&
(
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/alpha' ||
github.ref == 'refs/heads/beta' ||
github.ref == 'refs/heads/canary' ||
github.ref == 'refs/heads/pre/rc'
)
) ||
(
github.event_name == 'pull_request' &&
(
github.base_ref == 'main' ||
github.base_ref == 'alpha' ||
github.base_ref == 'beta' ||
github.base_ref == 'canary' ||
github.base_ref == 'pre/rc'
)
)
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Install
uses: kurocado-studio/styleguide/.github/actions/install@main
- name: Build
run: pnpm run build
- name: Release
id: semantic_release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}