forked from saber-hq/stable-swap
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.46 KB
/
release.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
name: Release
on:
workflow_dispatch: {}
push:
tags:
- "v*.*.*"
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: "1.59.0"
jobs:
release-crate:
runs-on: ubuntu-latest
name: Release crate on crates.io
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: saber
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- name: Publish crates
run: nix shell .#ci --command cargo ws publish --from-git --yes --skip-published --token ${{ secrets.CARGO_PUBLISH_TOKEN }}
release-binaries:
runs-on: ubuntu-latest
name: Release verifiable binaries
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: saber
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build programs
run: nix shell .#ci --command anchor build --verifiable --program-name stable_swap
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
target/deploy/*
target/idl/*
target/verifiable/*