Skip to content

cicd: updated workflows #3

cicd: updated workflows

cicd: updated workflows #3

Workflow file for this run

name: Continuous Deployment
on:
push:
tags:
- 'v*.*.*' # Match version tags like v1.0.0
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Cargo registry and build
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Publish crates
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
for crate in $(ls -d */ | grep -v 'target' | sed 's#/##'); do
echo "Publishing crate $crate"
cd $crate
cargo publish --token $CARGO_REGISTRY_TOKEN
cd ..
done