Skip to content

Commit

Permalink
Use release-plz in publish.yml (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
NobodyXu authored Jun 12, 2024
1 parent ee9d51b commit 8785d86
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 8785d86

Please sign in to comment.