-
Notifications
You must be signed in to change notification settings - Fork 37
72 lines (64 loc) · 2.13 KB
/
release.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
push:
tags:
- 'v*'
env:
SOLANA_CLI_VERSION: 1.16.17
jobs:
release:
name: Create the jito programs release
runs-on: big-runner-1
steps:
# Setup
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-anchor
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install --git https://github.com/coral-xyz/anchor --tag v0.29.0 anchor-cli --locked --force
# Build IDLs + programs
- name: Build program
run: anchor build --idl idl --program-name merkle_distributor
# Verified build
# --force because the cargo cache has it saved
- name: Install Solana Verify
run: |
cargo install solana-verify --force
solana-verify --version
- name: Verifiable Build
run: |
solana-verify build --library-name merkle_distributor
# Make sure no uncommitted changes
- name: Check for diff
run: git diff --exit-code
# Push to anchor repository
# - name: Anchor Login
# run: anchor login ${{ secrets.ANCHOR_PUBLISH_TOKEN }}
# - name: Publish merkle_distributor source code
# run: yes 'yes' | anchor publish merkle_distributor --skip-build --provider.cluster mainnet
# Upload artifacts
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build
path: |
target/deploy/merkle_distributor.so
programs/merkle-distributor/idl/merkle_distributor.json
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/deploy/merkle_distributor.so
programs/merkle-distributor/idl/merkle_distributor.json