From 2bb72aec55b333c80dd4b66f5edf3a5e224b67aa Mon Sep 17 00:00:00 2001 From: Christian Walter Date: Wed, 14 Feb 2024 14:04:01 +0100 Subject: [PATCH] feat: Migrate to Github Actions Signed-off-by: Christian Walter --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..a8c4db01 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: build +on: + push: + tags: + - v* + branches: + - master + - main + - feat/migrateToGithubActions + pull_request: +jobs: + build: + strategy: + matrix: + go-arch: [amd64, arm64] + runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + GOARCH: ${{ matrix.go-arch }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build txt-suite + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-suite cmd/txt-suite/*.go + - name: Build txt-prov + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-prov cmd/txt-prov/*.go + - name: Build bg-suite + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-suite cmd/bg-suite/*.go + - name: Build bg-prov + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-prov cmd/bg-prov/*.go + - name: Build pcr0tool + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o pcr0tool cmd/pcr0tool/*.go + - name: Build amd-suite + run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o amd-suite cmd/amd-suite/*.go \ No newline at end of file