Skip to content
Merged
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
9 changes: 6 additions & 3 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
permissions:
contents: write
packages: write
id-token: write # Required for crates.io trusted publishing

jobs:

Expand Down Expand Up @@ -104,14 +105,16 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
shell: bash
- name: Authenticate with crates.io
if: ${{ contains(github.ref, 'refs/heads/release/') }}
uses: rust-lang/crates-io-auth-action@v1
id: crates-io-auth
- name: Publish dry-run
if: ${{ contains(github.ref, 'refs/heads/release/') }}
run: |
set -euxo pipefail
cargo publish -p hyperlight-wasm-aot --dry-run
cargo publish -p hyperlight-wasm --dry-run
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }}
shell: bash
- name: Publish to crates.io
if: ${{ contains(github.ref, 'refs/heads/release/') }}
Expand All @@ -120,5 +123,5 @@ jobs:
cargo publish -p hyperlight-wasm-aot
cargo publish -p hyperlight-wasm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}
shell: bash