Update gitignore-in/gh-action action to v0.2.0 #13
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
name: publish crates | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
release: | |
# "released" events are emitted either when directly be released or be edited from pre-released. | |
types: [prereleased, released] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build --release --all-features | |
- name: publish (dry-run) | |
if: github.event_name == 'release' && github.event.release.prerelease | |
run: cargo publish --dry-run --allow-dirty | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- name: publish | |
if: github.event_name == 'release' && !github.event.release.prerelease | |
run: cargo publish --allow-dirty | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |