-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (41 loc) · 1.16 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
name: Release
permissions:
pull-requests: write
contents: write
on:
push:
tags:
- 'v[12].[0-9]+.[0-9]+'
- 'v[12].[0-9]+.[0-9]+-alpha.[0-9]+'
jobs:
crates-io:
name: Publish to crates.io
runs-on: ubicloud
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install 1.76.0 toolchain
run: |
rustup install 1.76.0-x86_64-unknown-linux-gnu
- name: Cargo login
run: |
cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish drift-idl-gen
run: |
cd crates/drift-idl-gen
cargo publish || true
- name: Publish drift-rs
run: |
# add libdrift_ffi_sys
curl -L https://github.com/user-attachments/files/17160233/libdrift_ffi_sys.so.zip > ffi.zip
unzip ffi.zip
sudo mv libdrift_ffi_sys.so $CARGO_DRIFT_FFI_PATH
rm ffi.zip # clean up for git
# publish to crates.io
cargo publish
env:
CARGO_DRIFT_FFI_PATH: "/usr/lib"