Skip to content

Commit 1053a3f

Browse files
committed
ci: add release workflow and simplify version-bump check
- Add release.yml workflow for automated releases - Simplify check-version-bump workflow
1 parent b70d1a7 commit 1053a3f

2 files changed

Lines changed: 90 additions & 2 deletions

File tree

.github/workflows/check-version-bump.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [22.x]
16+
node-version: [24.x]
1717

1818
steps:
1919
- name: Checkout
@@ -25,7 +25,6 @@ jobs:
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727
- name: Check version bumps
28-
continue-on-error: true ## Set this to false once versioning has been set up
2928
run: yarn version check
3029
env:
3130
CI: true

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
# No inputs - when you trigger, it releases
6+
7+
permissions:
8+
contents: write # Push branches/tags
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
# Only allow running from develop branch
15+
if: github.ref == 'refs/heads/develop'
16+
17+
steps:
18+
- uses: actions/create-github-app-token@v1
19+
id: app-token
20+
with:
21+
app-id: ${{ secrets.APP_ID }}
22+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
23+
24+
- name: Checkout develop branch
25+
uses: actions/checkout@v4
26+
with:
27+
ref: develop
28+
fetch-depth: 0 # Full history for merging
29+
token: ${{ steps.app-token.outputs.token }}
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '24'
35+
36+
- name: Install dependencies
37+
run: yarn install --immutable
38+
39+
- name: Build
40+
run: yarn build
41+
42+
- name: Lint
43+
run: yarn lint
44+
45+
- name: Test
46+
run: yarn test:unit
47+
48+
- name: Apply release changes
49+
run: yarn applyReleaseChanges
50+
51+
- name: Get version from package.json
52+
id: version
53+
run: |
54+
VERSION=$(node -p "require('./package.json').version")
55+
echo "version=$VERSION" >> $GITHUB_OUTPUT
56+
echo "Release version: $VERSION"
57+
58+
- name: Configure git
59+
run: |
60+
git config user.name "github-actions[bot]"
61+
git config user.email "github-actions[bot]@users.noreply.github.com"
62+
63+
- name: Commit changes if any
64+
run: |
65+
git add -A
66+
if git diff --staged --quiet; then
67+
echo "No changes to commit"
68+
else
69+
git commit -m "chore: release v${{ steps.version.outputs.version }}"
70+
fi
71+
72+
- name: Push develop branch
73+
run: git push origin develop
74+
75+
- name: Merge to master
76+
run: |
77+
git checkout master
78+
git merge develop --no-edit
79+
git push origin master
80+
81+
- name: Create and push release tag
82+
continue-on-error: true
83+
run: |
84+
git tag "v${{ steps.version.outputs.version }}"
85+
git push origin "v${{ steps.version.outputs.version }}"
86+
87+
# Deployment is handled by Netlify automatically on push to master
88+
# No manual deployment step needed - Netlify watches the master branch
89+
# and auto-deploys when changes are detected

0 commit comments

Comments
 (0)