ci: add Nitrogen run step to release workflow #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: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| if: "!contains(github.event.head_commit.message, 'skip ci')" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Run Nitrogen | |
| run: yarn nitrogen | |
| - name: Run tests | |
| run: yarn test | |
| - name: Type check | |
| run: yarn typecheck | |
| - name: Lint | |
| run: yarn lint | |
| - name: Build | |
| run: yarn prepare | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: yarn semantic-release | |