Repository navigation
67 lines (57 loc) · 1.97 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (57 loc) · 1.97 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
name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
timeout-minutes: 45
steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.21.0
registry-url: https://registry.npmjs.org
# npm trusted publishing (OIDC) requires npm >= 11.5.1.
- name: Upgrade npm
run: npm install -g npm@^11.5.1
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.1
- name: Cache Bun install
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Verify workspace
run: bun run verify
- name: Create release PR or publish packages
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-script: bun run release
version-script: bun run version-packages
pr-title: Release Platform packages
commit-message: Release Platform packages
push-git-tags: true
env:
# Publishing authenticates via npm trusted publishing (OIDC, id-token: write);
# no NPM_TOKEN secret is needed.
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
NPM_CONFIG_PROVENANCE: "true"