diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..9b75249 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,57 @@ +name: Release-plz + +on: + push: + branches: + - main + +jobs: + + # Release unpublished packages. + release-plz-release: + name: Release-plz release + if: ${{ github.repository_owner == 'rust-gpu' }} + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + steps: + - &checkout + name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + submodules: true + - &install-rust + name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + name: Release-plz PR + if: ${{ github.repository_owner == 'rust-gpu' }} + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 386456c..21fb202 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -93,29 +93,29 @@ jobs: submodules: true - uses: EmbarkStudios/cargo-deny-action@v2 - publish-check: - name: Publish Check - runs-on: ubuntu-22.04 + release-plz-dry-run: + name: Release-plz dry-run + runs-on: ubuntu-latest + permissions: {} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + persist-credentials: false submodules: true - - uses: cargo-bins/cargo-binstall@main - - run: cargo binstall cargo-release - - run: cargo fetch --locked - - name: cargo release --workspace - run: cargo release patch --allow-branch=* - # cargo release in workspace root doesn't actually run `publish check` on any crate, do so manually - - name: cargo publish check spirv-tools-sys - run: cargo release patch --allow-branch=* --manifest-path spirv-tools-sys/Cargo.toml - - name: cargo publish check spirv-tools - run: cargo release patch --allow-branch=* --manifest-path spirv-tools/Cargo.toml + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + dry_run: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This allows us to have a single job we can branch protect on, rather than needing # to update the branch protection rules when the test matrix changes test_success: runs-on: ubuntu-24.04 - needs: [lint, test, deny-check, publish-check] + needs: [lint, test, deny-check, release-plz-dry-run] # Hack for buggy GitHub Actions behavior with skipped checks: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks if: ${{ always() }} steps: @@ -125,7 +125,7 @@ jobs: [[ "${{ needs.lint.result }}" == "success" ]] || exit 1 [[ "${{ needs.test.result }}" == "success" ]] || exit 1 [[ "${{ needs.deny-check.result }}" == "success" ]] || exit 1 - [[ "${{ needs.publish-check.result }}" == "success" ]] || exit 1 + [[ "${{ needs.release-plz-dry-run.result }}" == "success" ]] || exit 1 defaults: run: diff --git a/.release-plz.toml b/.release-plz.toml new file mode 100644 index 0000000..3820c03 --- /dev/null +++ b/.release-plz.toml @@ -0,0 +1,9 @@ +[workspace] +# The folder `./spirv-tools-sys/spirv-tools/build_overrides` in the spirv-tools submodule is `.gitignore`-ed by the +# pattern `/build*/`, even though it contains commited files, which release-plz is complaining about. +allow_dirty = true + +[changelog] +body = """ +## [{{ version }}]{%- if release_link -%}({{ release_link }}){% endif %} - {{ timestamp | date(format="%Y-%m-%d") }}\n +""" diff --git a/release.toml b/release.toml deleted file mode 100644 index 18dba89..0000000 --- a/release.toml +++ /dev/null @@ -1,14 +0,0 @@ -# You should just need to run this to do a release of both crates: -# $ cargo release - -pre-release-commit-message = "Release {{version}}" -tag-message = "Release `{{crate_name}}` {{version}}" -allow-branch = ["main"] -shared-version = true -pre-release-replacements = [ - { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" }, - { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}" }, - { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" }, - { file = "CHANGELOG.md", search = "", replace = "\n## [Unreleased] - ReleaseDate" }, - { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/{{tag_name}}...HEAD" }, -] diff --git a/spirv-tools-sys/CHANGELOG.md b/spirv-tools-sys/CHANGELOG.md index d1978f4..1ad88fe 100644 --- a/spirv-tools-sys/CHANGELOG.md +++ b/spirv-tools-sys/CHANGELOG.md @@ -1,12 +1,10 @@ - - # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [Unreleased] - ReleaseDate ## [0.13.2] - 2026-02-16 ## [0.13.1] - 2026-02-12 @@ -15,7 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.12.1] - 2025-07-17 ## [0.12.0] - 2025-06-15 - [Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.2...HEAD [0.13.2]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.1...spirv-tools-sys-v0.13.2 [0.13.1]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.0...spirv-tools-sys-v0.13.1 diff --git a/spirv-tools/CHANGELOG.md b/spirv-tools/CHANGELOG.md index 87769ff..7c5fa11 100644 --- a/spirv-tools/CHANGELOG.md +++ b/spirv-tools/CHANGELOG.md @@ -1,13 +1,13 @@ - - # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [Unreleased] - ReleaseDate +- [PR#28](https://github.com/Rust-GPU/spirv-tools-rs/pull/28) fix `CXX=clang++` failing to build, and don't error on warnings + ## [0.13.2] - 2026-02-16 - [PR#26](https://github.com/Rust-GPU/spirv-tools-rs/pull/26) never skip C++ compile on clippy, [caused issues downstream](https://github.com/Rust-GPU/cargo-gpu/issues/140) @@ -108,7 +108,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added initial implementation, which includes the assembler, validator, and most of the optimizer, which meets the current needs of rust-gpu. - [Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.2...HEAD [0.13.2]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.1...spirv-tools-v0.13.2 [0.13.1]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.0...spirv-tools-v0.13.1