-
Notifications
You must be signed in to change notification settings - Fork 103
58 lines (48 loc) · 1.44 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.44 KB
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
name: Release
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
if: (contains(github.event.head_commit.message, 'skip-release') == false) && (github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'skip-release'))
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Enable Corepack
run: corepack enable
- name: Checkout
uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Install
run: |
yarn install --frozen-lockfile
- name: Build
run: |
yarn build
- name: Create canary release
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release:canary
- name: Create release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release