This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
Set the app version #167
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
on: | ||
push: | ||
pull_request: | ||
name: build | ||
jobs: | ||
build_amd64: | ||
name: build on ubuntu-22.04 amd64 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
- name: install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install bats golang make openssl swtpm tpm2-tools \ | ||
libcryptsetup-dev libgpgme-dev libcap-dev qemu-kvm \ | ||
libdevmapper-dev libacl1-dev libarchive-tools pip squashfs-tools \ | ||
sbsigntool | ||
sudo pip install virt-firmware | ||
- name: build | ||
run: | | ||
make | ||
- name: test | ||
run: | | ||
make test | ||
- name: Rename Binary | ||
run: | | ||
mv trust trust-linux-amd64 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: trust-linux-amd64 | ||
build_arm64: | ||
runs-on: ubuntu-latest | ||
name: Build on ubuntu-latest arm64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: uraimo/run-on-arch-action@v2 | ||
with: | ||
arch: aarch64 | ||
distro: ubuntu22.04 | ||
githubToken: ${{ github.token }} | ||
- name: Install | ||
run: | | ||
apt-get -y update | ||
apt-get install -q -y git golang-go | ||
apt-get install -y bats golang make openssl swtpm tpm2-tools \ | ||
libcryptsetup-dev libgpgme-dev libcap-dev qemu-kvm \ | ||
libdevmapper-dev libacl1-dev libarchive-tools pip squashfs-tools \ | ||
sbsigntool | ||
sudo pip install virt-firmware | ||
- name: Build | ||
run: | | ||
git describe --always --dirty | ||
go version | ||
make | ||
- name: Test | ||
run: | | ||
make test | ||
- name: Rename Binary | ||
run: | | ||
mv trust trust-linux-arm64 | ||
- name: release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: trust-linux-arm64 |