-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.48 KB
/
release.yml
File metadata and controls
57 lines (53 loc) · 1.48 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
name: Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- uses: oven-sh/setup-bun@v2
name: Install Bun
- uses: actions/cache@v5
name: Setup Bun cache
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run test
- name: Build dist
run: bun run build
- name: Create Release PR or Publish
id: changesets
uses: changesets/action@v1
with:
version: npm run changeset version
publish: npm run changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: "" # Workaround for https://github.com/changesets/action/pull/545