chore: bump version to 0.4.3 #1
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: release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
test: | |
uses: ./.github/workflows/test.yml | |
lint: | |
uses: ./.github/workflows/lint.yml | |
# Validate the crate version matches the tag. | |
check_version: | |
needs: [build, test, lint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check crate version | |
run: "[[ \"v$(yq '.package.version' Cargo.toml)\" == \"${{ github.ref_name }}\" ]]" | |
# Create a github release | |
github_release: | |
needs: [build, test, lint, check_version] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
# Publish the crate (scoping the secret to only this job) | |
publish_crate: | |
needs: [build, test, lint, github_release] | |
permissions: | |
contents: write | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
runs-on: ubuntu-latest | |
container: | |
image: rust:latest | |
steps: | |
- name: ensure node is installed for act | |
if: ${{ env.ACT }} | |
run: command -v node || (apt update && apt install -y nodejs) | |
- uses: actions/checkout@v4 | |
- name: Publish crate | |
if: ${{ env.CARGO_REGISTRY_TOKEN }} != '' | |
run: cargo publish |