Repository navigation
99 lines (95 loc) · 2.92 KB
/
Copy pathci.yml
File metadata and controls
99 lines (95 loc) · 2.92 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: DeckFlow CLI
on:
pull_request:
push:
branches: [main, develop]
tags: ["v*"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
# The SDK source is private. Forks cannot access its checkout secret.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: deckflow-cli
persist-credentials: false
- uses: actions/checkout@v4
with:
repository: deckflow/deckbase
ref: 7fb954c0ee9d1901822a1ecdaf43cbd3b94e05e1
path: deckbase
token: ${{ secrets.DECKBASE_CHECKOUT_TOKEN }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm install --global pnpm@11.21.0
- name: Install SDK build dependencies
working-directory: deckbase
env:
HUSKY: "0"
DECKBASE_PACKAGES_TOKEN: ${{ secrets.DECKBASE_PACKAGES_TOKEN }}
run: |
printf '%s\n' '//npm.pkg.github.com/:_authToken=${DECKBASE_PACKAGES_TOKEN}' > "$RUNNER_TEMP/deckbase.npmrc"
NPM_CONFIG_USERCONFIG="$RUNNER_TEMP/deckbase.npmrc" pnpm install --frozen-lockfile
- name: Build and verify SDK
working-directory: deckbase
run: |
pnpm build:sdk
pnpm verify:sdk
- name: Check CLI
working-directory: deckflow-cli
run: |
pnpm install --frozen-lockfile
pnpm ci:check
pnpm pack --pack-destination "${{ runner.temp }}/deckflow"
- uses: actions/upload-artifact@v4
with:
name: deckflow-package
path: ${{ runner.temp }}/deckflow/*.tgz
if-no-files-found: error
verify-install:
needs: build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 18.17.0
- uses: actions/download-artifact@v4
with:
name: deckflow-package
path: package
- run: node scripts/verify-release.mjs --install
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: verify-install
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://npm.pkg.github.com
scope: "@deckflow"
- uses: actions/download-artifact@v4
with:
name: deckflow-package
path: package
- run: node scripts/verify-release.mjs --publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}