Skip to content

fix: implement openapi-fetch compat without openapi-fetch dependency #43

fix: implement openapi-fetch compat without openapi-fetch dependency

fix: implement openapi-fetch compat without openapi-fetch dependency #43

Workflow file for this run

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