fix: release.yaml if condition #4
Workflow file for this run
This file contains 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
# Attempts to perform a release when a particular tag is pushed. This uses the | |
# `cargo release`, and assumes that the CRATES_TOKEN secret has been set and | |
# contains an API token with which we can publish our crates to crates.io. | |
# | |
# The `ibc-derive` publishing process is managed manually since it's not | |
# consistently published with every release. | |
# | |
# If release operation fails partway through due to a temporary error (e.g. the | |
# crate being published depends on the crate published just prior, but the prior | |
# crate isn't yet available via crates.io), one can simply rerun this workflow. | |
name: Release | |
on: | |
push: | |
branches: | |
- "release/*" | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v0.26.0, v1.0.0 | |
- "v[0-9]+.[0-9]+.[0-9]+-pre.[0-9]+" # e.g. v0.26.0-pre.1 | |
jobs: | |
release-check: | |
if: github.ref_type != 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Publish crates (dry run) | |
run: cargo release --workspace --exclude ibc-derive | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} | |
release: | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Publish crates | |
run: cargo release --workspace --exclude ibc-derive | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} |