Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-13
- os: macos-14
- os: macos-15-intel
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/rust-ecosystem-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Rust Ecosystem Release

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: Version shared by Rust, Node.js, and Python (for example, 0.7.0)
required: true
type: string

permissions:
contents: read
actions: write

jobs:
release:
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'rust-v')
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Determine version
id: version
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ inputs.version }}"
else
VERSION="${GITHUB_REF_NAME#rust-v}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Validate aligned versions
shell: bash
run: |
VERSION="${{ steps.version.outputs.version }}"
CARGO_VERSION="$(sed -n 's/^version = "\([^"]*\)"/\1/p' minipdf-rs/Cargo.toml | head -n 1)"
NODE_VERSION="$(node -p "require('./minipdf-node/package.json').version")"
PYTHON_VERSION="$(sed -n 's/^version = "\([^"]*\)"/\1/p' minipdf-python/pyproject.toml | head -n 1)"
if [ "$CARGO_VERSION" != "$VERSION" ]; then
echo "::error::Rust workspace version '$CARGO_VERSION' does not match release version '$VERSION'. Update minipdf-rs/Cargo.toml before releasing."
exit 1
fi
if [ "$NODE_VERSION" != "$VERSION" ]; then
echo "::error::npm package version '$NODE_VERSION' does not match release version '$VERSION'. Update minipdf-node/package.json and package-lock.json before releasing."
exit 1
fi
if [ "$PYTHON_VERSION" != "$VERSION" ]; then
echo "::error::Python package version '$PYTHON_VERSION' does not match release version '$VERSION'. Update minipdf-python/pyproject.toml and src/minipdf/__init__.py before releasing."
exit 1
fi

- name: Dispatch NPM publish
shell: bash
run: |
gh workflow run npm-publish.yml --ref "$GITHUB_SHA" \
-f version="${{ steps.version.outputs.version }}" \
-f mode=stage

- name: Dispatch PyPI publish
shell: bash
run: |
gh workflow run pypi-publish.yml --ref "$GITHUB_SHA" \
-f version="${{ steps.version.outputs.version }}"
8 changes: 8 additions & 0 deletions FEATURE_PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ Notes:
the package backend, falling back to the pure Python renderers only when the
extension is not importable. The capability matrix below describes the pure
Python fallback.
- Node.js and Python versions follow the Rust core version. A `rust-vX.Y.Z`
release dispatches the NPM and PyPI publish workflows with the same version
through
[`rust-ecosystem-release.yml`](.github/workflows/rust-ecosystem-release.yml).
When bumping the Rust version, update `minipdf-node/package.json` (and
`package-lock.json`), `minipdf-python/pyproject.toml`,
`minipdf-python/src/minipdf/__init__.py`, and
`minipdf-python/native/Cargo.toml` in the same change.
- `P` does not mean the same depth in every language. The detailed matrices
below identify the important differences.
- The public .NET page-size and margin overrides currently apply to DOCX. The
Expand Down
2 changes: 1 addition & 1 deletion minipdf-node/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion minipdf-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minipdf-node"
version = "0.2.0"
version = "0.7.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/mini-software/MiniPdf"
Expand Down
4 changes: 2 additions & 2 deletions minipdf-node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion minipdf-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minipdf",
"version": "0.2.0",
"version": "0.7.0",
"description": "Native Node.js Office-to-PDF conversion powered by MiniPdf for Rust",
"license": "Apache-2.0",
"author": "MiniPdf contributors",
Expand Down
Loading