@@ -3,7 +3,7 @@ name: 'Test & Release'
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - ' ** '
7
7
pull_request :
8
8
branches :
9
9
- main
38
38
name : ' Release package'
39
39
needs : [ test ]
40
40
runs-on : ubuntu-latest
41
- if : |
42
- github.event_name == 'push' &&
43
- github.ref == 'refs/heads/main' &&
44
- !contains(github.event.head_commit.message, '[skip-release]') &&
45
- !startsWith(github.event.head_commit.message, '/renovate/')
41
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
46
42
47
43
steps :
48
44
- uses : actions/checkout@v4
@@ -57,52 +53,24 @@ jobs:
57
53
npm install
58
54
npm run dev:prepare
59
55
60
- - name : Release
61
- run : |
62
- npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISHING_KEY }}
63
- npm run release:ci
64
-
65
- bump-version :
66
- name : ' Bump package version'
67
- needs : [ test ]
68
- runs-on : ubuntu-latest
69
- if : |
70
- github.event_name == 'push' &&
71
- startsWith(github.ref, 'refs/heads/renovate/')
72
-
73
- steps :
74
- - uses : actions/checkout@v4
75
-
76
- - uses : actions/setup-node@v4
77
- with :
78
- node-version : ' 22'
79
- cache : ' npm'
80
-
81
- - name : Install
82
- run : |
83
- npm install
84
- npm run dev:prepare
85
-
86
- - name : Bump version
87
- id : bump_version
56
+ - name : Release (Renovate)
57
+ if : startsWith(github.event.head_commit.message, 'chore(deps)')
88
58
run : |
89
59
git config user.name "github-actions[bot]"
90
60
git config user.email "github-actions[bot]@users.noreply.github.com"
91
-
61
+
92
62
NEW_VERSION=$(npm version patch -m "chore: bumped package version to %s")
93
- echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
94
-
95
- - name : Update CHANGELOG.md
96
- run : |
97
63
echo -e "# $NEW_VERSION\n- Bumped dependencies\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
64
+
98
65
git add CHANGELOG.md
99
-
100
- - name : Push changes
101
- run : |
102
66
git commit --amend --no-edit
103
67
git push origin main --tags
68
+
69
+ npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISHING_KEY }}
70
+ npm run release:ci
104
71
105
- - name : Release new version
72
+ - name : Release (Manual)
73
+ if : " !startsWith(github.event.head_commit.message, 'chore(deps)')"
106
74
run : |
107
75
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISHING_KEY }}
108
- npm run release:ci
76
+ npm run release:ci || true
0 commit comments