Skip to content

v0.8.1

v0.8.1 #39

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
ref:
description: "Tag/branch/SHA to publish from"
required: true
env:
CARGO_TERM_COLOR: always
jobs:
publish:
environment: CICD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || inputs.ref }}
- uses: dtolnay/rust-toolchain@stable
- name: Publish crates
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
shell: bash
run: |
set -euo pipefail
publish() {
local manifest="$1"
echo "==> Publishing: $manifest"
cargo publish --dry-run --manifest-path "$manifest" >/dev/null
set +e
out=$(cargo publish --token "$CARGO_REGISTRY_TOKEN" --manifest-path "$manifest" 2>&1)
code=$?
set -e
if [ $code -eq 0 ]; then
echo "Published: $manifest"
else
if echo "$out" | grep -qiE "already (uploaded|exists)"; then
echo "Skip (already published): $manifest"
else
echo "$out"
exit $code
fi
fi
sleep 30
}
publish volga-macros/Cargo.toml
publish volga-di/Cargo.toml
publish volga-dev-cert/Cargo.toml
publish volga-rate-limiter/Cargo.toml
publish volga/Cargo.toml