-
Notifications
You must be signed in to change notification settings - Fork 16
58 lines (50 loc) · 1.21 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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