Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 }}
Loading