Add github actions
Signed-off-by: Alex Kattathra Johnson <alex.kattathra.johnson@gmail.com>
This commit is contained in:
parent
ee23be4aac
commit
0f9fa4aa66
1 changed files with 42 additions and 0 deletions
42
.github/workflows/publish.yml
vendored
Normal file
42
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
name: Publish
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
name: Audit
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/audit@v1
|
||||
|
||||
crates_io_publish:
|
||||
name: Publish (crates.io)
|
||||
needs:
|
||||
- audit
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: cargo-release Cache
|
||||
id: cargo_release_cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cargo/bin/cargo-release
|
||||
key: ${{ runner.os }}-cargo-release
|
||||
|
||||
- run: cargo install cargo-release
|
||||
if: steps.cargo_release_cache.outputs.cache-hit != 'true'
|
||||
|
||||
- run: cargo package
|
||||
|
||||
- run: cargo release publish --no-confirm --execute --allow-branch HEAD
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue