Skip to content

Commit

Permalink
Update publish.yml to use release-plz (#1101)
Browse files Browse the repository at this point in the history
Release-plz would automatically creates a release PR on commits to main, and bumps the version.
  • Loading branch information
NobodyXu committed Jun 23, 2024
1 parent a1e291a commit 7bc135f
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
tags:
- '*'
branches:
- main

jobs:
publish:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish to crates.io
run: |
cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 7bc135f

Please sign in to comment.