version #25
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 Workflow | |
| on: | |
| push: | |
| branches: | |
| - 'release/next' | |
| - 'release/rc' | |
| - 'release/stable' | |
| jobs: | |
| run-release-script: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| defaults: | |
| run: | |
| working-directory: . | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: './package.json' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Publish to npm (stable branch) | |
| if: startsWith(github.ref_name, 'release/stable') | |
| run: npx --yes needle-publish-helper@next publish "." --webhook "${{ secrets.DISCORD_WEBHOOK }}" --access-token "${{ secrets.NPM_TOKEN }}" --create-tag "release/" --llm-api-key "${{ secrets.LLM_API_KEY }}" | |
| - name: Publish to npm (rc branch) | |
| if: startsWith(github.ref_name, 'release/rc') | |
| run: npx --yes needle-publish-helper@next publish "." --webhook "${{ secrets.DISCORD_WEBHOOK }}" --access-token "${{ secrets.NPM_TOKEN }}" --tag "rc" --version+tag --create-tag "release/" --llm-api-key "${{ secrets.LLM_API_KEY }}" | |
| - name: Publish to npm (next and experimental branches) | |
| if: startsWith(github.ref_name, 'release/next') | |
| run: npx --yes needle-publish-helper@next publish "." --webhook "${{ secrets.DISCORD_WEBHOOK }}" --access-token "${{ secrets.NPM_TOKEN }}" --tag "${{ github.ref_name }}" --version+tag --version+hash --create-tag "release/" --llm-api-key "${{ secrets.LLM_API_KEY }}" | |