chore: bump version to 0.21.0 #30
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, target: bun-linux-x64, name: docx-linux-x64 } | |
| - { os: ubuntu-latest, target: bun-linux-arm64, name: docx-linux-arm64 } | |
| - { os: macos-latest, target: bun-darwin-x64, name: docx-darwin-x64 } | |
| - { os: macos-latest, target: bun-darwin-arm64, name: docx-darwin-arm64 } | |
| - { os: windows-latest, target: bun-windows-x64, name: docx-windows-x64.exe } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: bun-${{ runner.os }}- | |
| - run: bun install --frozen-lockfile | |
| - name: Compile | |
| run: bun build --compile --target=${{ matrix.target }} --outfile=${{ matrix.name }} src/index.ts | |
| - name: Smoke-test render on Linux artifact | |
| if: matrix.os == 'ubuntu-latest' && matrix.target == 'bun-linux-x64' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y libreoffice | |
| ./${{ matrix.name }} render tests/fixtures/markdown-import.docx \ | |
| --out /tmp/smoke --engine libreoffice --pages 1 | |
| test -s /tmp/smoke/page-001.png | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ${{ matrix.name }} | |
| if-no-files-found: error | |
| release: | |
| name: Publish Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: ./artifacts | |
| merge-multiple: true | |
| - name: Stage attribution files for release | |
| # Per LGPL §4 we ship LGPL-3.0.txt + NOTICES alongside every binary; | |
| # NOTICES is the canonical attribution surface for PDFium (BSD-3), | |
| # jpeg-js (BSD-3), highlight.js (BSD-3), and libheif (LGPL). | |
| run: cp LICENSE LGPL-3.0.txt NOTICES ./artifacts/ | |
| - name: Generate SHA256SUMS for the binaries | |
| # Published as a release asset so install.sh / bootstrap.sh can verify the | |
| # downloaded binary's integrity (supply-chain hardening). | |
| run: | | |
| cd ./artifacts | |
| sha256sum docx-* > SHA256SUMS | |
| cat SHA256SUMS | |
| - name: List artifacts | |
| run: ls -la ./artifacts | |
| - uses: softprops/action-gh-release@v3 | |
| with: | |
| files: ./artifacts/* | |
| generate_release_notes: true | |
| fail_on_unmatched_files: true |