Reset branch to main

This commit is contained in:
Sebastian Espei
2026-03-09 17:02:30 +01:00
parent 68343a4c9a
commit e474d11730
606 changed files with 189976 additions and 43358 deletions

View File

@@ -39,13 +39,6 @@ jobs:
echo "Updating from '${{ steps.current-version.outputs.version }}' to '${{ steps.upstream-version.outputs.version }}'"
fi
- name: Setup Node
if: steps.gate.outputs.run == 'true'
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Enable corepack (pnpm)
if: steps.gate.outputs.run == 'true'
run: corepack enable
@@ -58,24 +51,31 @@ jobs:
- name: Clone upstream embed-pdf-viewer
if: steps.gate.outputs.run == 'true'
run: git clone https://github.com/embedpdf/embed-pdf-viewer ../embed-pdf-viewer
run: git clone --depth 1 --branch main https://github.com/embedpdf/embed-pdf-viewer ./_upstream/embed-pdf-viewer
- name: Setup Node
if: steps.gate.outputs.run == 'true'
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install upstream deps
if: steps.gate.outputs.run == 'true'
working-directory: ../embed-pdf-viewer
run: pnpm install --frozen-lockfile
working-directory: ./_upstream/embed-pdf-viewer
run: pnpm install --no-frozen-lockfile
- name: Build snippet
if: steps.gate.outputs.run == 'true'
working-directory: ../embed-pdf-viewer
working-directory: ./_upstream/embed-pdf-viewer
run: pnpm run build:snippet
- name: Pack snippet tarball
if: steps.gate.outputs.run == 'true'
working-directory: ../embed-pdf-viewer
working-directory: ./_upstream/embed-pdf-viewer
run: |
npm pack ./snippet --pack-destination ../bentopdf/vendor/embedpdf
ls -l ../bentopdf/vendor/embedpdf
npm pack ./viewers/snippet --pack-destination ../../vendor/embedpdf
ls -l ../../vendor/embedpdf
- name: Sanitize tarball (rename pkg and pin deps)
if: steps.gate.outputs.run == 'true'
@@ -114,19 +114,23 @@ jobs:
- name: Refresh lockfile
if: steps.gate.outputs.run == 'true'
run: npm install --package-lock-only
run: npm install --package-lock-only --ignore-scripts
- name: Write upstream version marker
if: steps.gate.outputs.run == 'true'
run: |
echo "${{ steps.upstream-version.outputs.version }}" > vendor/embedpdf/.upstream-version
- name: Cleanup upstream clone
if: steps.gate.outputs.run == 'true'
run: rm -rf ./_upstream
- name: Create Pull Request
if: steps.gate.outputs.run == 'true'
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'chore: update embedpdf snippet'
title: 'Update vendored EmbedPDF snippet'
commit-message: "build(deps): bump embedpdf-snippet from ${{ steps.current-version.outputs.version }} to ${{ steps.upstream-version.outputs.version }}"
title: "build(deps): bump embedpdf-snippet from ${{ steps.current-version.outputs.version }} to ${{ steps.upstream-version.outputs.version }}"
body: |
- Build snippet from upstream embed-pdf-viewer via `npm run build:snippet`
- Pack tarball into `vendor/embedpdf/` and point dependency to it