Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/expert-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v4
with:
node-version: '22'
- uses: oven-sh/setup-bun@v2

- run: bun install --frozen-lockfile

- name: Extract version from perstack.toml
id: version
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Check if version already exists
id: check
run: |
OUTPUT=$(npx -y perstack expert versions ${{ matrix.definition.name }} \
OUTPUT=$(bun ./apps/perstack/bin/cli.ts expert versions ${{ matrix.definition.name }} \
--api-key ${{ secrets.PERSTACK_API_KEY }} 2>&1) || true
echo "$OUTPUT"
if echo "$OUTPUT" | grep -q "^ ${{ steps.version.outputs.version }}"; then
Expand All @@ -47,14 +47,14 @@ jobs:
- name: Publish scope if private
if: steps.check.outputs.should-publish == 'true'
run: |
npx -y perstack expert publish ${{ matrix.definition.name }} \
bun ./apps/perstack/bin/cli.ts expert publish ${{ matrix.definition.name }} \
--api-key ${{ secrets.PERSTACK_API_KEY }} || true

- name: Push to draft
if: steps.check.outputs.should-publish == 'true'
id: push
run: |
OUTPUT=$(npx -y perstack expert push ${{ matrix.definition.draft-id }} \
OUTPUT=$(bun ./apps/perstack/bin/cli.ts expert push ${{ matrix.definition.draft-id }} \
--config ${{ matrix.definition.path }}/perstack.toml \
--api-key ${{ secrets.PERSTACK_API_KEY }})
echo "$OUTPUT"
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Assign version
if: steps.check.outputs.should-publish == 'true'
run: |
npx -y perstack expert version \
bun ./apps/perstack/bin/cli.ts expert version \
${{ matrix.definition.draft-id }} \
${{ steps.push.outputs.ref-id }} \
${{ steps.version.outputs.version }} \
Expand Down