Bump MSRV to 1.69.0 due to failing dependency resolution (#29) #12
Workflow file for this run
This file contains 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*' ] | |
jobs: | |
release-github: | |
name: Publish to GitHub releases | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: "startsWith(github.ref, 'refs/tags/')" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set variables | |
id: vars | |
run: | | |
CHANGELOG=$(awk '/^## v/ {n=NR; i++}; i==1 {if (NR==n) {print "## Release Notes"} else {print}}; i>1 {exit}' CHANGELOG.md \ | |
| python3 -c 'import sys, json; print(json.dumps(sys.stdin.read()))') | |
echo "changelog=$CHANGELOG" >> $GITHUB_OUTPUT | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} | |
generate_release_notes: true | |
body: ${{ fromJson(steps.vars.outputs.changelog) }} | |
release-crate: | |
name: Publish to crates.io | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Publish crate to crates.io | |
run: | | |
name=$(cargo metadata -q --no-deps | jq -r '.packages[0].name') | |
version=$(cargo metadata -q --no-deps | jq -r '.packages[0].version') | |
echo "Publishing ${name}-${version}" | |
cargo publish --token ${{ secrets.CARGO_TOKEN }} |