Skip to content

Prepare to publish with workflow (#53) #2

Prepare to publish with workflow (#53)

Prepare to publish with workflow (#53) #2

Workflow file for this run

name: Publish to crates.io
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC token exchange
steps:
- uses: actions/checkout@v5
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Set Cargo.toml version
shell: bash
env:
RELEASE_TAG: ${{ github.ref }}
run: |
mv Cargo.toml Cargo.toml.orig
sed "s/0\\.0\\.0-git/${RELEASE_TAG##*\/v}/" Cargo.toml.orig > Cargo.toml
rm -f Cargo.toml.orig
- run: cargo publish --package ic-http-gateway --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}