Skip to content

Commit 160ddba

Browse files
committed
chore: add publish-latest workflow
1 parent 5a14cdd commit 160ddba

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/publish-latest.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish radashi@latest
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [18.x, 20.x, 22.x]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v4
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
cache: pnpm
21+
- run: pnpm install
22+
- run: pnpm test
23+
- if: ${{ matrix.node-version == '22.x' }}
24+
name: Upload coverage reports to Codecov
25+
uses: codecov/[email protected]
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
29+
validate:
30+
name: Validate
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: pnpm/action-setup@v4
35+
- uses: actions/setup-node@v4
36+
with:
37+
registry-url: 'https://registry.npmjs.org'
38+
node-version: '22.x'
39+
cache: pnpm
40+
- run: pnpm install
41+
- name: Lint
42+
run: pnpm lint
43+
- name: Check Build
44+
run: pnpm build
45+
46+
publish-latest:
47+
name: Publish Latest
48+
needs: [test, validate]
49+
runs-on: ubuntu-latest
50+
continue-on-error: true
51+
permissions:
52+
id-token: write
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
- uses: pnpm/action-setup@v4
58+
- uses: actions/setup-node@v4
59+
with:
60+
registry-url: 'https://registry.npmjs.org'
61+
node-version: '22.x'
62+
cache: pnpm
63+
- run: pnpm install
64+
- run: pnpm build
65+
66+
- name: Install script dependencies
67+
run: |
68+
pnpm install -C scripts/versions
69+
pnpm install -C scripts/radashi-db
70+
71+
- name: Publish
72+
env:
73+
GIT_CLIFF_PAT: ${{ secrets.GIT_CLIFF_PAT }}
74+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
75+
RADASHI_BOT_TOKEN: ${{ secrets.RADASHI_BOT_TOKEN }}
76+
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
77+
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
78+
run: |
79+
./scripts/versions/node_modules/.bin/tsx ./scripts/versions/ci-publish.ts --latest

0 commit comments

Comments
 (0)