Skip to content

✨ Add --serve reverse-proxy mode to info page. #25

✨ Add --serve reverse-proxy mode to info page.

✨ Add --serve reverse-proxy mode to info page. #25

Workflow file for this run

name: Publish crates.io
on:
push:
tags: [v*]
jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Ensure tag is on master
run: |
git fetch origin master --depth=1
if ! git merge-base --is-ancestor HEAD origin/master; then
echo "::error::Tag must be on master branch to publish"
exit 1
fi
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-release
- run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
- name: Skip if already published
id: check-exists
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" "https://crates.io/api/v1/crates/${CRATE}/${VERSION}" || echo "000")
if [ "$STATUS" = "200" ]; then
echo "::warning::Version ${VERSION} already published — skipping."
exit 78
fi
env:
CRATE: malkuth
- run: |-
cargo release \
publish \
--all-features \
--allow-branch HEAD \
--no-confirm \
--no-verify \
--execute