Skip to content

Commit 9fca147

Browse files
committed
ci: report how to install what this run built
1 parent 37b2283 commit 9fca147

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ on:
1010
required: false
1111
type: string
1212
default: main
13+
outputs:
14+
version:
15+
description: Version the preview was published under.
16+
value: ${{ jobs.generate.outputs.version }}
17+
install:
18+
description: Command that installs the preview package.
19+
value: ${{ jobs.build.outputs.install }}
1320

1421
name: CI
1522

@@ -56,6 +63,8 @@ jobs:
5663
build:
5764
needs: generate
5865
runs-on: ubuntu-latest
66+
outputs:
67+
install: ${{ steps.preview.outputs.install }}
5968
steps:
6069
- uses: actions/checkout@v7
6170
with:
@@ -76,4 +85,12 @@ jobs:
7685

7786
- run: pnpm build
7887

79-
- run: pnpm exec pkg-pr-new publish --packageManager=pnpm --no-template
88+
- id: preview
89+
run: |
90+
pnpm exec pkg-pr-new publish \
91+
--packageManager=pnpm \
92+
--no-template \
93+
--json preview.json \
94+
--comment=${{ github.repository == 'vrchatapi/vrchatapi-javascript' && 'update' || 'off' }}
95+
96+
echo "install=pnpm add $(jq -r '.packages[0].url' preview.json)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)