Skip to content

Bump version

Bump version #52

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check CHANGELOG.md
run: ./scripts/check_CHANGELOG.sh "${{ github.ref }}"
- name: Install llvm
run: sudo apt-get install llvm
- name: Login
run: echo ${{ secrets.CRATES_IO_TOKEN }} | cargo login
- name: Publish
run: |
# smoelius: The crates must be published in this order, which is a reverse topological
# sort of `docs/crates.dot`.
for X in internal macro runtime test-fuzz cargo-test-fuzz; do
# smoelius: Continue if a previous publish attempt failed.
TMP="$(mktemp)"
cargo publish --manifest-path "$X"/Cargo.toml 2>"$TMP" || (
cat "$TMP" |
tee /dev/stderr |
tail -n 1 |
grep '^.*: crate version `[^`]*` is already uploaded$'
)
# smoelius: Give `crates.io` a chance to update.
sleep 1m
done
- name: Get version
id: get-version
run: echo "version=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_OUTPUT"
- name: Create release notes
run: git log -p -1 CHANGELOG.md | grep '^+\($\|[^+]\)' | cut -c 2- | tee body.md
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
name: Release ${{ steps.get-version.outputs.version }}
body_path: body.md
draft: false
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
token: ${{ secrets.REPO_TOKEN }}