Skip to content

Commit 0b0b342

Browse files
danbot315Daniel Clayton
andauthored
ci: add changesets release workflow with explicit permissions (#11)
Co-authored-by: Daniel Clayton <dan@Daniels-Mac-mini.local>
1 parent 33a05a2 commit 0b0b342

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency:
8+
group: release-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
packages: write
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Bun
24+
uses: oven-sh/setup-bun@v2
25+
with:
26+
bun-version: 1.2.22
27+
28+
- name: Install dependencies
29+
run: bun install --frozen-lockfile
30+
31+
- name: Build
32+
run: bun run build
33+
34+
- name: Create release PR or publish
35+
uses: changesets/action@v1
36+
with:
37+
version: bun run changeset:version
38+
publish: bun run changeset:publish
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)