fix: force release #42
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: semantic-release | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| semantic: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
| HUSKY: 0 | |
| CI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24.x" | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: printf "//`node -p \"require('url').parse('https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\n" >> ~/.npmrc | |
| - run: npm ci | |
| - run: npm run build --if-present | |
| - name: Upload coverage to Qlty | |
| uses: qltysh/qlty-action/coverage@v2 | |
| continue-on-error: true | |
| with: | |
| token: ${{ secrets.CC_TEST_REPORTER_ID }} | |
| files: coverage/lcov.info | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24.x" | |
| - run: previousVersion=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json) | |
| - run: | | |
| # Install semantic-release and common plugins locally (no-global) so the pipeline can run reliably. | |
| npm install --no-audit --no-fund --no-save \ | |
| @semantic-release/changelog \ | |
| @semantic-release/commit-analyzer \ | |
| @semantic-release/git \ | |
| @semantic-release/github \ | |
| @semantic-release/exec \ | |
| @semantic-release/npm \ | |
| @semantic-release/release-notes-generator \ | |
| semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| HUSKY: 0 | |
| CI: true | |
| - run: | | |
| # Run semantic-release using the locally installed packages | |
| npx semantic-release@25 --ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| HUSKY: 0 | |
| CI: true | |
| - run: finalVersion=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json) | |
| - run: | | |
| if [ "$previousVersion" != "$finalVersion" ]; then | |
| git push | |
| fi |