|
17 | 17 | - alpha |
18 | 18 | - next |
19 | 19 |
|
| 20 | +permissions: |
| 21 | + contents: write # to be able to publish a GitHub release |
| 22 | + issues: write # to be able to comment on released issues |
| 23 | + pull-requests: write # to be able to comment on released pull requests |
| 24 | + id-token: write # to enable use of OIDC for trusted publishing and npm provenance |
| 25 | + |
20 | 26 | jobs: |
21 | 27 |
|
22 | 28 | test-nodejs: |
|
33 | 39 | runs-on: ${{ matrix.os }} |
34 | 40 | strategy: |
35 | 41 | matrix: |
36 | | - # Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner. |
37 | | - # See: https://github.com/puppeteer/puppeteer/issues/12327 and https://github.com/asyncapi/parser-js/issues/1001 |
38 | | - os: [ubuntu-latest, macos-13, windows-latest] |
| 42 | + os: [ubuntu-latest, macos-latest, windows-latest] |
39 | 43 | steps: |
40 | 44 | - name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows |
41 | 45 | run: | |
|
49 | 53 | run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT |
50 | 54 | shell: bash |
51 | 55 | - if: steps.packagejson.outputs.exists == 'true' |
52 | | - name: Check package-lock version |
53 | | - uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master |
| 56 | + name: Determine what node version to use |
| 57 | + # This workflow is from our own org repo and safe to reference by 'master'. |
| 58 | + uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR |
| 59 | + with: |
| 60 | + node-version: ${{ vars.NODE_VERSION }} |
54 | 61 | id: lockversion |
55 | 62 | - if: steps.packagejson.outputs.exists == 'true' |
56 | 63 | name: Setup Node.js |
@@ -95,34 +102,37 @@ jobs: |
95 | 102 | run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT |
96 | 103 | shell: bash |
97 | 104 | - if: steps.packagejson.outputs.exists == 'true' |
98 | | - name: Check package-lock version |
99 | | - uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master |
| 105 | + name: Determine what node version to use |
| 106 | + # This workflow is from our own org repo and safe to reference by 'master'. |
| 107 | + uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR |
| 108 | + with: |
| 109 | + node-version: ${{ vars.NODE_VERSION }} |
100 | 110 | id: lockversion |
101 | 111 | - if: steps.packagejson.outputs.exists == 'true' |
102 | 112 | name: Setup Node.js |
103 | 113 | uses: actions/setup-node@v4 |
104 | 114 | with: |
105 | 115 | node-version: "${{ steps.lockversion.outputs.version }}" |
| 116 | + registry-url: "https://registry.npmjs.org" |
106 | 117 | - if: steps.packagejson.outputs.exists == 'true' |
107 | 118 | name: Install dependencies |
108 | 119 | shell: bash |
109 | 120 | run: npm ci |
110 | 121 | - if: steps.packagejson.outputs.exists == 'true' |
111 | 122 | name: Add plugin for conventional commits for semantic-release |
112 | | - run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0 |
| 123 | + run: npm install --save-dev conventional-changelog-conventionalcommits@9.1.0 |
113 | 124 | - if: steps.packagejson.outputs.exists == 'true' |
114 | 125 | name: Publish to any of NPM, Github, and Docker Hub |
115 | 126 | id: release |
116 | 127 | env: |
117 | 128 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
118 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
119 | 129 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} |
120 | 130 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
121 | 131 | GIT_AUTHOR_NAME: asyncapi-bot |
122 | 132 | GIT_AUTHOR_EMAIL: info@asyncapi.io |
123 | 133 | GIT_COMMITTER_NAME: asyncapi-bot |
124 | 134 | GIT_COMMITTER_EMAIL: info@asyncapi.io |
125 | | - run: npx semantic-release@19.0.4 |
| 135 | + run: npx semantic-release@25.0.2 |
126 | 136 | - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel |
127 | 137 | name: Report workflow run status to Slack |
128 | 138 | uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #using https://github.com/8398a7/action-slack/releases/tag/v3.16.2 |
|
0 commit comments