mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
ci: Publish to crates.io in release.yml
after tagging (#1152)
Fixed #1046 so that we don't have to manually run `cargo-publish` after the CI is merged. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
d8419ea5a2
commit
abecd9ae14
3 changed files with 18 additions and 20 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -22,9 +22,16 @@ jobs:
|
|||
event-data: ${{ toJSON(github.event) }}
|
||||
extract-notes-under: '### Release notes'
|
||||
|
||||
tag:
|
||||
test:
|
||||
if: needs.info.outputs.is-release == 'true'
|
||||
needs: info
|
||||
uses: ./.github/workflows/ci.yml
|
||||
|
||||
tag:
|
||||
if: needs.info.outputs.is-release == 'true'
|
||||
needs:
|
||||
- info
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -42,6 +49,11 @@ jobs:
|
|||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
custom_tag: ${{ needs.info.outputs.version }}
|
||||
tag_prefix: v
|
||||
- name: Publish to crates.io
|
||||
run: |
|
||||
cargo publish --no-verify -p '${{ needs.info.outputs.crate }}'
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
||||
package:
|
||||
if: needs.info.outputs.is-release == 'true' && needs.info.outputs.crate == 'cargo-binstall'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue