Skip to content

Commit 5653cd7

Browse files
committed
[build] Add versioning and publishing workflow for next release
1 parent 73044f5 commit 5653cd7

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Version and Publish (next)
2+
on:
3+
workflow_dispatch:
4+
5+
concurrency: ${{ github.workflow }}-${{ github.ref }}
6+
7+
permissions:
8+
id-token: write
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
version:
14+
timeout-minutes: 15
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 23
27+
cache: pnpm
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Cache turbo build setup
33+
uses: actions/cache@v4
34+
with:
35+
path: .turbo
36+
key: ${{ runner.os }}-turbo-${{ github.sha }}
37+
restore-keys: |
38+
${{ runner.os }}-turbo-
39+
40+
- name: Build
41+
run: pnpm run ci:build --filter="@sjsf/*"
42+
43+
- name: Create and publish versions
44+
uses: changesets/action@v1
45+
with:
46+
version: pnpm exec changeset pre enter next && pnpm ci:version
47+
publish: pnpm exec changeset publish --tag next
48+
commit: "[build] release"
49+
title: "[build] release"
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/version-and-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
with:
4848
version: pnpm ci:version
4949
publish: pnpm exec changeset publish
50-
commit: "[ci] release"
51-
title: "[ci] release"
50+
commit: "[build] release"
51+
title: "[build] release"
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5454
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)