generated from furystack/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (71 loc) · 2.35 KB
/
release.yml
File metadata and controls
89 lines (71 loc) · 2.35 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release
on:
workflow_dispatch:
# No inputs - when you trigger, it releases
permissions:
contents: write # Push branches/tags
jobs:
release:
name: Release
runs-on: ubuntu-latest
# Only allow running from develop branch
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout develop branch
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0 # Full history for merging
token: ${{ steps.app-token.outputs.token }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Apply release changes
run: yarn applyReleaseChanges
- name: Get version from package.json
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Release version: $VERSION"
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit changes if any
run: |
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: release v${{ steps.version.outputs.version }}"
fi
- name: Push develop branch
run: git push origin develop
- name: Merge to master
run: |
git checkout master
git merge develop --no-edit
git push origin master
- name: Create and push release tag
continue-on-error: true
run: |
git tag "v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
# Deployment is handled by Netlify automatically on push to master
# No manual deployment step needed - Netlify watches the master branch
# and auto-deploys when changes are detected