Skip to content

Commit a6ff21d

Browse files
authored
Merge pull request #7 from ProverCoderAI/main
fix(ci): make snapshot resilient
2 parents abee39a + e3ce2e3 commit a6ff21d

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/snapshot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,27 @@ jobs:
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
26+
continue-on-error: true
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2429
run: pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
30+
- name: Fallback snapshot artifacts
31+
if: steps.snapshot.outcome != 'success'
32+
shell: bash
33+
run: |
34+
set -euo pipefail
35+
mkdir -p artifacts
36+
cd packages/app
37+
npm pack --silent --pack-destination ../../artifacts
38+
- name: Upload snapshot artifacts
39+
if: steps.snapshot.outcome != 'success'
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: context-doc-snapshot
43+
path: artifacts/*.tgz

0 commit comments

Comments
 (0)