Bump version #54
Workflow file for this run
This file contains hidden or 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: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - name: Publish | |
| run: | | |
| # smoelius: Publishing in this order ensures that all dependencies are met. | |
| for X in core backends necessist; 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 [^`]* already exists on crates.io index$' | |
| ) | |
| done | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| - 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@v3 | |
| 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') }} |