ci: Verify before publishing (#1167)

Run `cargo-publish` without `--no-verify` to verify the publish is valid
and does not depend on unpublished crates in job tag of workflow
`release.yml`, which could be caused by incorrect merge order.

Also enabled `check-semver` to `cargo-bins/release-pr@v2` and install
`cargo-semver-checks` using `taiki-e/install-action@v2` in
job make-release-pr of workflow `release-pr.yml`, since
`release-pr` would try to use `cargo-binstall` for installing
`cargo-semver-checks` used in `check-semver`, but we did not explicitly
require `taiki-e/install-actions@v2` to install `cargo-binstall`, so
`release-pr` could fallback to `cargo-install` which is just too slow.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-25 01:23:15 +10:00 committed by GitHub
parent ca00cbaccc
commit 4ddd860c01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -41,7 +41,7 @@ jobs:
- name: Install cargo-release
uses: taiki-e/install-action@v2
with:
tool: cargo-release
tool: cargo-release,cargo-semver-checks
- uses: cargo-bins/release-pr@v2
with:
@ -51,3 +51,4 @@ jobs:
pr-label: release
pr-release-notes: ${{ inputs.crate == 'bin' }}
pr-template-file: .github/scripts/release-pr-template.ejs
check-semver: true

View file

@ -51,7 +51,7 @@ jobs:
tag_prefix: v
- name: Publish to crates.io
run: |
cargo publish --no-verify -p '${{ needs.info.outputs.crate }}'
cargo publish -p '${{ needs.info.outputs.crate }}'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}