Skip to content

Commit d98bd34

Browse files
committed
ci: add canary pre-release publishing on staging push + remove dead dashboard workflow
Add release-canary.yml that publishes @canary dist-tagged builds to npm on every push to staging, gated by tests and scoped per-package via dorny/paths-filter. Remove release-dashboard.yml which references the extracted dashboard/ directory that no longer exists.
1 parent fed59c3 commit d98bd34

2 files changed

Lines changed: 91 additions & 75 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Release Canary
2+
3+
on:
4+
push:
5+
branches: [staging]
6+
paths: ['container/**', 'cli/**']
7+
8+
jobs:
9+
changes:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
container: ${{ steps.filter.outputs.container }}
13+
cli: ${{ steps.filter.outputs.cli }}
14+
steps:
15+
- uses: actions/checkout@v6
16+
- uses: dorny/paths-filter@v3
17+
id: filter
18+
with:
19+
filters: |
20+
container:
21+
- 'container/**'
22+
cli:
23+
- 'cli/**'
24+
25+
publish-container:
26+
needs: changes
27+
if: needs.changes.outputs.container == 'true'
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v6
31+
32+
- uses: actions/setup-node@v6
33+
with:
34+
node-version: 18
35+
registry-url: https://registry.npmjs.org
36+
37+
- name: Run tests
38+
run: npm test
39+
working-directory: container
40+
41+
- name: Set canary version
42+
run: |
43+
BASE=$(node -p "require('./package.json').version")
44+
CANARY="${BASE}-staging.${GITHUB_SHA::7}"
45+
npm version "$CANARY" --no-git-tag-version
46+
working-directory: container
47+
48+
- name: Publish to npm
49+
run: npm publish --tag canary
50+
working-directory: container
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
54+
publish-cli:
55+
needs: changes
56+
if: needs.changes.outputs.cli == 'true'
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v6
60+
61+
- uses: oven-sh/setup-bun@v2
62+
63+
- name: Install dependencies
64+
run: bun install
65+
working-directory: cli
66+
67+
- name: Run tests
68+
run: bun test
69+
working-directory: cli
70+
71+
- name: Build
72+
run: bun run build
73+
working-directory: cli
74+
75+
- uses: actions/setup-node@v6
76+
with:
77+
node-version: 18
78+
registry-url: https://registry.npmjs.org
79+
80+
- name: Set canary version
81+
run: |
82+
BASE=$(node -p "require('./package.json').version")
83+
CANARY="${BASE}-staging.${GITHUB_SHA::7}"
84+
npm version "$CANARY" --no-git-tag-version
85+
working-directory: cli
86+
87+
- name: Publish to npm
88+
run: npm publish --tag canary
89+
working-directory: cli
90+
env:
91+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release-dashboard.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)