V1.3.1 #32
Workflow file for this run
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| test-and-build: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for semantic-release | |
| - name: Use Node.js {{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: "https://registry.npmjs.org/" | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run test:badges | |
| publish: | |
| needs: [test-and-build] | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for semantic-release | |
| - name: Use Node.js {{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: "https://registry.npmjs.org/" | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run test:badges | |
| - name: Debug secrets | |
| run: | | |
| echo "NPM_TOKEN set? ${{ secrets.NPM_TOKEN != '' }}" | |
| echo "GITHUB_TOKEN set? ${{ secrets.GITHUB_TOKEN != '' }}" | |
| - name: Release with semantic-release | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm semantic-release |