-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (57 loc) · 2.22 KB
/
build.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: never
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install repro-env
run: |
wget 'https://github.com/kpcyrd/repro-env/releases/download/v0.4.0/repro-env'
echo 'e331825a19d41a5ad4dd7c1ce7a810eccbb9eb8945c3fc78abe9f040df8c1204 repro-env' | sha256sum -c -
sudo install -m755 repro-env -t /usr/bin
- name: Install deps
run: sudo apt-get update && sudo apt-get -y install protobuf-compiler podman
- name: Build
run: repro-env build -- cargo build --release --target x86_64-unknown-linux-musl
- name: Generate SHA checksum
run: shasum target/x86_64-unknown-linux-musl/release/ic-gateway > ic-gateway.shasum
- name: Remove build files
run: rm -rf target
- name: Build again
run: repro-env build -- cargo build --release --target x86_64-unknown-linux-musl
- name: Check SHA checksum
run: shasum -c ic-gateway.shasum
- name: Strip
run: /usr/bin/strip target/x86_64-unknown-linux-musl/release/ic-gateway
- name: Create package root
run: |
mkdir -p .debpkg/usr/sbin
mkdir -p .debpkg/etc/systemd/system
mkdir -p .debpkg/etc/default
mkdir -p .debpkg/DEBIAN
cp target/x86_64-unknown-linux-musl/release/ic-gateway .debpkg/usr/sbin
cp deploy/ic-gateway.service .debpkg/etc/systemd/system
cp deploy/ic-gateway.env .debpkg/etc/default/ic-gateway
chmod -R g-s .debpkg
- uses: jiro4989/build-deb-action@1bd8ed1458d3dc331f62bf50468cce9b610fd0af
with:
package: ic-gateway
package_root: .debpkg
maintainer: "DFINITY Boundary Nodes Team"
version: ${{ github.ref }}
arch: amd64
desc: "IC-Gateway Service"
homepage: "https://github.com/dfinity/ic-gateway"
- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
makeLatest: true
artifacts: "target/x86_64-unknown-linux-musl/release/ic-gateway,*.deb"
body: "IC-Gateway release"