Skip to content

fix(docs): install mermaid explicitly, was only vocs's optional peer #35

fix(docs): install mermaid explicitly, was only vocs's optional peer

fix(docs): install mermaid explicitly, was only vocs's optional peer #35

Workflow file for this run

name: Release-plz
on:
push:
branches:
- main
permissions:
contents: read
jobs:
# Runs when a release-plz PR is merged into main: tags the release,
# creates a GitHub release with the generated changelog, and runs
# `cargo publish` for imgx-vips then imgx (release-plz orders publishes
# by the dependency graph).
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
# The default GITHUB_TOKEN can't create/approve PRs on this org
# (locked at the Enterprise level), so we mint a short-lived
# installation token from the dedicated offuno-release-plz GitHub
# App instead, which isn't subject to that restriction.
- name: Generate a token from the offuno-release-plz App
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: 3962886
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
token: ${{ steps.app-token.outputs.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install libvips (cached)
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libvips-dev
version: "1.0"
execute_install_scripts: true
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_PACKAGE_KEY }}
# Opens/updates a PR bumping versions and CHANGELOG.md based on commits
# since the last release, following Conventional Commits (see
# CLAUDE.md). Merging that PR is what triggers release-plz-release above.
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Generate a token from the offuno-release-plz App
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: 3962886
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
token: ${{ steps.app-token.outputs.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install release-plz
uses: taiki-e/install-action@v2
with:
tool: release-plz@0.3.159
# release-plz normally determines "next version" by diffing against
# the crate as published on crates.io. Before imgx/imgx-vips's first
# publish, that registry lookup always came back "not found", and
# release-plz silently treated that as "nothing new to release"
# instead of falling back to git tags (confirmed both in production
# -- 6 merged fix/feat commits since v0.1.0 produced zero proposed
# bump -- and via a local `release-plz update` repro). Point
# --registry-manifest-path at a checkout of the last release tag
# instead, which release-plz *does* correctly diff the working tree
# against -- kept even post-publish since it's a strict superset of
# the registry diff (also catches unpublished/yanked states).
- name: Checkout last release tag as the comparison baseline
run: |
last_tag=$(git tag -l 'imgx-v*' | sort -V | tail -1)
echo "Comparing against $last_tag"
git worktree add /tmp/last-release "$last_tag"
- name: Run release-plz
# Unlike release-plz/action, the bare CLI doesn't read GITHUB_TOKEN
# automatically -- it needs --git-token explicitly.
run: release-plz release-pr --registry-manifest-path /tmp/last-release/Cargo.toml --git-token "$GITHUB_TOKEN"
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}