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