Remove env_log #7
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: Crate | |
on: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
permissions: | |
contents: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rust-std | |
profile: minimal | |
- name: Cache Cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-crate-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-crate- | |
- name: Setup environment | |
run: | | |
git config user.name "Linus Oleander" | |
git config user.email "oleander@users.noreply.github.com" | |
cargo install cargo-bump --force | |
- name: Bump version | |
run: cargo bump patch --git-tag | |
- name: Release to crates.io (dry-run) | |
if: github.ref != 'refs/heads/main' | |
run: cargo publish --dry-run | |
- name: Release to crates.io | |
if: github.ref == 'refs/heads/main' | |
run: cargo publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- name: Release to GitHub | |
if: github.ref == 'refs/heads/main' | |
run: git push origin HEAD --tags |