Skip to content

docs: add changelog for v0.1.0 #6

docs: add changelog for v0.1.0

docs: add changelog for v0.1.0 #6

Workflow file for this run

name: Release
on:
push:
tags: ["v*.*.*"]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
tag-check:
name: Tag Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Validate tag matches workspace version
env:
TAG_NAME: ${{ github.ref_name }}
run: |
python3 - <<'PY'
import os
import pathlib
import tomllib
tag_name = os.environ["TAG_NAME"]
if not tag_name.startswith("v"):
raise SystemExit(f"expected v-prefixed tag, got {tag_name}")
tag_version = tag_name[1:]
cargo = tomllib.loads(pathlib.Path("Cargo.toml").read_text())
workspace_version = cargo["workspace"]["package"]["version"]
if tag_version != workspace_version:
raise SystemExit(
f"tag version {tag_version} does not match workspace version {workspace_version}"
)
PY
build:
needs: tag-check
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-14
- target: x86_64-apple-darwin
runner: macos-latest
- target: aarch64-unknown-linux-gnu
runner: ubuntu-24.04-arm
- target: aarch64-unknown-linux-musl
runner: ubuntu-24.04-arm
- target: x86_64-unknown-linux-gnu
runner: ubuntu-latest
- target: x86_64-unknown-linux-musl
runner: ubuntu-latest
- target: x86_64-pc-windows-msvc
runner: windows-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install musl-tools (Linux musl)
if: contains(matrix.target, 'musl')
run: sudo apt-get update && sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@bc2d2e71bd35c5549942babaa51a89c586b981d1 # v2.8.1
with:
key: release-${{ matrix.target }}
- name: Build
run: cargo build --release --workspace --locked --target ${{ matrix.target }}
- name: Prepare assets
shell: bash
env:
TARGET: ${{ matrix.target }}
run: |
helper="target/${TARGET}/release/dispatch-extension-catalog"
if [[ "$TARGET" == *-windows-msvc ]]; then
helper="${helper}.exe"
fi
"$helper" \
--catalog catalog/extensions.json \
stage-release-assets \
--target "$TARGET" \
--release-dir "target/${TARGET}/release" \
--dist-dir dist \
--extra dispatch-extension-catalog
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist-${{ matrix.target }}
path: dist/*
release:
name: Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: dist
pattern: dist-*
merge-multiple: true
- name: Generate checksums
working-directory: dist
run: sha256sum * > SHA256SUMS.txt
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
run: |
gh release create "$TAG_NAME" \
--title "$TAG_NAME" \
--generate-notes \
dist/*