Merge pull request #39 from dfinity/fix-cert-provider #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |