-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (48 loc) · 1.32 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
56
name: Build Release
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
ref:
description: ref to build binary from
required: false
push:
branches:
- 'frank/build-release'
jobs:
build-binary:
runs-on: ubuntu-22.04
strategy:
matrix:
cpu: [ "", "skylake" ]
env:
RUSTFLAGS: "-C target-cpu=${{ matrix.cpu }}"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Install protoc
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Setup Rust toolchain
run: rustup show
- name: Build Node
run: cargo build --profile=production --all
- name: Save parachain binary
run: |
mkdir -p build
cp target/production/pop-node build/pop-node${{ matrix.cpu != '' && format('-{0}', matrix.cpu) || '' }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: binaries
path: build
- name: Add artifacts to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
build/pop-node${{ matrix.cpu != '' && format('-{0}', matrix.cpu) || '' }}