chore: convert from dep5 to REUSE.toml (#498) #193
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] | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| # Only gate push events by commit message; allow workflow_dispatch always | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(release): publish')) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build | |
| run: yarn build | |
| # Choose publish command based on the event type | |
| - name: Publish to NPM (push) | |
| if: github.event_name == 'push' | |
| run: npm run release:publish | |
| - name: Publish to NPM (manual) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: npm run release:publish-manual |