ci: log trusted publishing release environment #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [14.x] | |
| name: test - node ${{ matrix.node-version }} | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: set node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: npm install | |
| run: npm install | |
| - name: npm run build | |
| run: npm run build | |
| - name: npm run test | |
| run: npm run test --ci | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/master' | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: set node.js 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - name: Use npm with trusted publishing support | |
| run: npm install -g npm@11.13.0 | |
| - name: Show release tool versions | |
| run: | | |
| node --version | |
| npm --version | |
| npm config get registry | |
| - name: npm install | |
| run: npm install | |
| - name: npm run build | |
| run: npm run build | |
| - name: Release | |
| uses: cycjimmy/semantic-release-action@v6 | |
| with: | |
| extra_plugins: | | |
| @semantic-release/npm@13.1.5 | |
| @semantic-release/changelog | |
| @semantic-release/git | |
| branches: master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DEBUG: semantic-release:*,@semantic-release/npm:* | |
| NPM_CONFIG_LOGLEVEL: verbose |