Repository navigation
60 lines (51 loc) · 1.81 KB
/
Copy pathcreate-release.yml
File metadata and controls
60 lines (51 loc) · 1.81 KB
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
name: Create and publish release
on:
pull_request:
types:
- closed
jobs:
produce_binaries:
name: Compile released binaries
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y libsqlite3-dev libssl-dev libzmq3-dev pkg-config build-essential cmake
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build released binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --bins --all-features --release
- name: Prepare zip file
uses: papeloto/action-zip@v1
with:
files: target/release/address target/release/farcasterd target/release/peerd target/release/swap-cli target/release/swapd target/release/syncerd target/release/walletd
recursive: false
dest: bins.zip
- name: Archive release bins
uses: actions/upload-artifact@v2
with:
name: release-bins
path: bins.zip
retention-days: 7
create_release:
name: Create from merged release branch
uses: farcaster-project/workflows/.github/workflows/create-release.yml@v1.0.2
# Do not run before uploading the binaries
needs: produce_binaries
with:
artifact_name: release-bins
files: bins.zip
release_to_crates:
name: Publish the new release to crates.io
uses: farcaster-project/workflows/.github/workflows/release-to-crates-io.yml@v1.0.2
# Do not run before creating the release is done
needs: create_release
secrets:
cratesio_token: ${{ secrets.H4SH3D_CARGO_REGISTRY_TOKEN }}