diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index eba05a91..2bab0a7a 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -49,9 +49,11 @@ jobs: run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash - if: steps.packagejson.outputs.exists == 'true' - name: Check package-lock version + name: Determine what node version to use # This workflow is from our own org repo and safe to reference by 'master'. uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR + with: + node-version: ${{ vars.NODE_VERSION }} id: lockversion - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 326f6f11..3668d6f4 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -17,6 +17,12 @@ on: - alpha - next +permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for trusted publishing and npm provenance + jobs: test-nodejs: @@ -47,9 +53,11 @@ jobs: run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash - if: steps.packagejson.outputs.exists == 'true' - name: Check package-lock version + name: Determine what node version to use # This workflow is from our own org repo and safe to reference by 'master'. uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR + with: + node-version: ${{ vars.NODE_VERSION }} id: lockversion - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js @@ -94,15 +102,18 @@ jobs: run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash - if: steps.packagejson.outputs.exists == 'true' - name: Check package-lock version + name: Determine what node version to use # This workflow is from our own org repo and safe to reference by 'master'. uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR + with: + node-version: ${{ vars.NODE_VERSION }} id: lockversion - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "${{ steps.lockversion.outputs.version }}" + registry-url: "https://registry.npmjs.org" - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies shell: bash @@ -115,14 +126,13 @@ jobs: id: release env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} GIT_AUTHOR_NAME: asyncapi-bot GIT_AUTHOR_EMAIL: info@asyncapi.io GIT_COMMITTER_NAME: asyncapi-bot GIT_COMMITTER_EMAIL: info@asyncapi.io - run: npx semantic-release@19.0.4 + run: npx semantic-release@25.0.2 - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel name: Report workflow run status to Slack uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #using https://github.com/8398a7/action-slack/releases/tag/v3.16.2 diff --git a/.github/workflows/if-nodejs-version-bump.yml b/.github/workflows/if-nodejs-version-bump.yml index 2a4c36bc..d038414e 100644 --- a/.github/workflows/if-nodejs-version-bump.yml +++ b/.github/workflows/if-nodejs-version-bump.yml @@ -25,9 +25,11 @@ jobs: id: packagejson run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT - if: steps.packagejson.outputs.exists == 'true' - name: Check package-lock version + name: Determine what node version to use # This workflow is from our own org repo and safe to reference by 'master'. uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR + with: + node-version: ${{ vars.NODE_VERSION }} id: lockversion - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js