chore: update CHANGELOG #4
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: Publish Library | |
| on: | |
| push: | |
| tags: | |
| - 'nmrs-v*' | |
| jobs: | |
| publish: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Parse version from tag | |
| id: version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/nmrs-v} | |
| echo "VERSION=$TAG" >> $GITHUB_ENV | |
| echo "Publishing nmrs version: $TAG" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| pkg-config \ | |
| libglib2.0-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Verify version matches tag | |
| run: | | |
| CARGO_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "nmrs") | .version') | |
| if [ "$CARGO_VERSION" != "${{ env.VERSION }}" ]; then | |
| echo "Error: Cargo.toml version ($CARGO_VERSION) doesn't match tag version (${{ env.VERSION }})" | |
| exit 1 | |
| fi | |
| echo "Version check passed: $CARGO_VERSION" | |
| - name: Publish to crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --package nmrs | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: nmrs-v${{ env.VERSION }} | |
| name: nmrs ${{ env.VERSION }} | |
| body: | | |
| ## nmrs ${{ env.VERSION }} | |
| Published to [crates.io](https://crates.io/crates/nmrs/${{ env.VERSION }}) | |
| See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md) for details. | |
| draft: false | |
| prerelease: false | |