Skip to content

Commit d7bc599

Browse files
chore: update semantic-release workflow for clarity and organization
1 parent f99e8db commit d7bc599

File tree

1 file changed

+27
-46
lines changed

1 file changed

+27
-46
lines changed
Lines changed: 27 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,38 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Node.js CI
1+
name: Release
52

63
on:
7-
['push']
4+
push:
5+
branches:
6+
- next
7+
- v2
88

99
jobs:
10-
# test:
11-
# runs-on: ubuntu-latest
12-
# steps:
13-
# - uses: actions/checkout@master
14-
# - uses: actions/setup-node@v1
15-
# with:
16-
# node-version: 12
17-
# - name: install
18-
# run: npm install
19-
# - name: test
20-
# run: npm run test:
21-
2210
publish:
2311
runs-on: ubuntu-latest
2412
permissions:
2513
contents: write
2614
issues: write
2715
pull-requests: write
28-
id-token: write
16+
2917
steps:
30-
- uses: actions/checkout@v4
31-
- uses: actions/setup-node@v4
32-
with:
33-
node-version: 20
34-
registry-url: 'https://registry.npmjs.org'
35-
- run: npm install -g npm@latest
36-
- uses: cycjimmy/semantic-release-action@v4
37-
with:
38-
semantic_version: 24
39-
branches: |
40-
[
41-
'next',
42-
'v2'
43-
]
44-
extra_plugins: |
45-
@semantic-release/changelog
46-
@semantic-release/git
47-
id: semantic
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51-
NPM_CONFIG_PROVENANCE: true
52-
- if: steps.semantic.outputs.new_release_published == 'true'
53-
run: |
54-
echo ${{ steps.semantic.outputs.new_release_version }}
55-
echo ${{ steps.semantic.outputs.new_release_major_version }}
56-
echo ${{ steps.semantic.outputs.new_release_minor_version }}
57-
echo ${{ steps.semantic.outputs.new_release_patch_version }}
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
registry-url: https://registry.npmjs.org/
24+
25+
- uses: cycjimmy/semantic-release-action@v4
26+
with:
27+
semantic_version: 24
28+
branches: |
29+
[
30+
"next",
31+
"v2"
32+
]
33+
extra_plugins: |
34+
@semantic-release/changelog
35+
@semantic-release/git
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)