Skip to content

Commit

Permalink
action: add auto cargo publish
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Aug 8, 2023
1 parent 34ee825 commit f5c8d78
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cargo-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Cargo Publish

on:
push:
branches:
- master
paths:
- '**Cargo.toml'
pull_request:
branches:
- master
paths:
- '**Cargo.toml'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: katyo/publish-crates@v2
with:
dry-run: ${{ github.event_name != 'push' }}
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
check-repo: false
publish-delay: 1000

0 comments on commit f5c8d78

Please sign in to comment.