-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 1.62 KB
/
publish.yml
File metadata and controls
42 lines (34 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}"