Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
luizfonseca committed Jun 23, 2024
1 parent 677123c commit 923e640
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release
on:
push:
branches:
- master

jobs:
release:
name: Release
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Release
id: release
uses: google-github-actions/release-please-action@v4
with:
release-type: rust

publish-cargo:
continue-on-error: true
name: Publish to crates.io
needs:
- release
if: ${{ needs.release.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.release.outputs.tag_name }}

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt,clippy

- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}

0 comments on commit 923e640

Please sign in to comment.