-
Notifications
You must be signed in to change notification settings - Fork 159
103 lines (82 loc) · 2.74 KB
/
Copy pathrelease.yml
File metadata and controls
103 lines (82 loc) · 2.74 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Release
on:
push:
branches: [main]
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
stable-release:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'push'
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0
with:
node-version: '24.18.0'
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Check release files
run: pnpm lint:ci
- name: Test packages
run: pnpm test
- name: Create release PR or publish packages
id: changesets
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # tag=v1.9.0
with:
version: pnpm version-packages
publish: pnpm release
commit: 'chore: changeset version'
title: 'chore: changeset version'
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
canary-release:
name: Canary Release
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
permissions:
contents: read
id-token: write
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0
with:
node-version: '24.18.0'
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Version packages for canary
run: pnpm version-packages:canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build canary packages
run: pnpm build
- name: Check generated canary release files
run: pnpm lint:ci
- name: Test canary packages
run: pnpm test
- name: Publish canary packages
run: pnpm release:canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}