-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (51 loc) · 1.5 KB
/
snapshot.yml
File metadata and controls
54 lines (51 loc) · 1.5 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
name: Snapshot
on:
pull_request:
branches: [main, next-minor, next-major]
workflow_dispatch:
permissions: {}
jobs:
snapshot:
name: Snapshot
if: github.repository_owner == 'ProverCoderAI'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Install dependencies
uses: ./.github/actions/setup
with:
node-version: 22.12.0
- name: Build package
run: pnpm build
- name: Create snapshot
id: snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
working-directory: packages/app
run: |
set +e
pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "success=true" >> "$GITHUB_OUTPUT"
else
echo "success=false" >> "$GITHUB_OUTPUT"
echo "pkg-pr-new failed (likely app not installed); falling back to artifacts."
fi
exit 0
- name: Fallback snapshot artifacts
if: steps.snapshot.outputs.success != 'true'
shell: bash
run: |
set -euo pipefail
mkdir -p artifacts
cd packages/app
npm pack --silent --pack-destination ../../artifacts
- name: Upload snapshot artifacts
if: steps.snapshot.outputs.success != 'true'
uses: actions/upload-artifact@v6
with:
name: context-doc-snapshot
path: artifacts/*.tgz