Skip to content

Publish

Publish #19

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
crate:
description: Crate
required: true
default: pinocchio
type: choice
options:
- pinocchio
- pubkey
dry_run:
description: Dry run
required: true
default: true
type: boolean
env:
RUST_VERSION: 1.78.0
SOLANA_VERSION: 1.18.20
CARGO_CACHE: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
jobs:
publish_release:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
- name: Publish crate
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
MANIFEST="./sdk/${{ inputs.crate }}/Cargo.toml"
if [ "${{ inputs.dry_run }}" == "true" ]; then
OPTIONS="--dry-run"
else
OPTIONS=""
fi
cargo publish --manifest-path $MANIFEST $OPTIONS