Skip to content

Commit

Permalink
Merge pull request #5 from callqh/chore/rust-publish-ci
Browse files Browse the repository at this point in the history
chore: rust publish
  • Loading branch information
callqh authored Apr 9, 2024
2 parents 8addf4b + 4256a63 commit c7b1abe
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/main' && github.event_name == 'push') || (github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true)
needs:
- build-freebsd
- test-macOS-windows-binding
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Cargo Crates

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- 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/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz # retry 3 times
uses: MarcoIeni/[email protected]
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz
uses: MarcoIeni/[email protected]
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit c7b1abe

Please sign in to comment.