Skip to content

Commit 35a1ef6

Browse files
authored
Update snapshot.yml
1 parent 2ec84e4 commit 35a1ef6

1 file changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/snapshot.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,45 @@ permissions: {}
1010
jobs:
1111
snapshot:
1212
name: Snapshot
13-
if: github.repository_owner == 'skulidropek'
13+
if: github.repository_owner == 'ProverCoderAI'
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 10
1616
steps:
1717
- uses: actions/checkout@v6
1818
- name: Install dependencies
1919
uses: ./.github/actions/setup
20+
with:
21+
node-version: 22.12.0
2022
- name: Build package
2123
run: pnpm build
2224
- name: Create snapshot
2325
id: snapshot
24-
run: pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
shell: bash
29+
working-directory: packages/app
30+
run: |
31+
set +e
32+
pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
33+
STATUS=$?
34+
if [ $STATUS -eq 0 ]; then
35+
echo "success=true" >> "$GITHUB_OUTPUT"
36+
else
37+
echo "success=false" >> "$GITHUB_OUTPUT"
38+
echo "pkg-pr-new failed (likely app not installed); falling back to artifacts."
39+
fi
40+
exit 0
41+
- name: Fallback snapshot artifacts
42+
if: steps.snapshot.outputs.success != 'true'
43+
shell: bash
44+
run: |
45+
set -euo pipefail
46+
mkdir -p artifacts
47+
cd packages/app
48+
npm pack --silent --pack-destination ../../artifacts
49+
- name: Upload snapshot artifacts
50+
if: steps.snapshot.outputs.success != 'true'
51+
uses: actions/upload-artifact@v6
52+
with:
53+
name: context-doc-snapshot
54+
path: artifacts/*.tgz

0 commit comments

Comments
 (0)