name: Cargo Publish
run-name: Publish new version for commit ${{ github.sha }} to crates.io
on:
release:
types:
jobs:
cargo-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
## Does not work: triggered workflow is not found
# - name: Wait for Tets
# uses: kamilchodola/wait-for-workflow-action@1.1.1
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# workflow_id: 'test-action.yml'
# max_wait_minutes: 1
# timeout: 120
# repo_name: embytes-buffer
# org_name: siemtim-dev
# ref: ${{ github.ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# See https://github.com/marketplace/actions/publish-crates
# Publish crate
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}