|
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 |
5 | 2 |
|
6 | 3 | on: |
7 | | - ['push'] |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - next |
| 7 | + - v2 |
8 | 8 |
|
9 | 9 | 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 | | - |
22 | 10 | publish: |
23 | 11 | runs-on: ubuntu-latest |
24 | 12 | permissions: |
25 | 13 | contents: write |
26 | 14 | issues: write |
27 | 15 | pull-requests: write |
28 | | - id-token: write |
| 16 | + |
29 | 17 | 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