This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Release #11
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: Release | |
| on: | |
| workflow_run: | |
| workflows: ['CI'] | |
| branches: [master] | |
| types: [completed] | |
| permissions: | |
| contents: read # for checkout | |
| jobs: | |
| release: | |
| name: NPM Release | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| 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 | |
| steps: | |
| # https://github.com/actions/checkout | |
| - uses: actions/checkout@v6 | |
| # https://github.com/actions/setup-node | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| # Ensure npm 11.5.1 or later is installed | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Release | |
| run: cd dist/ngx-toastr && npx semantic-release@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |