From b819c2445c0cba978c6a7224d5500ba1421fa555 Mon Sep 17 00:00:00 2001 From: genofire Date: Thu, 18 Jul 2024 15:07:52 +0200 Subject: [PATCH] WIP --- .github/workflows/go.yml | 13 ++++++++++--- .github/workflows/release.yml | 6 ++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 84396da2..e7043898 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -67,6 +67,11 @@ jobs: args: --timeout=5m build: + strategy: + matrix: + include: + - arch: amd64 + os: linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -76,11 +81,13 @@ jobs: with: go-version: '1.21' - name: Build - run: go build -ldflags "-X github.com/FreifunkBremen/yanic/cmd.VERSION=$(git describe --tags)" -v + run: go build -ldflags "-X github.com/FreifunkBremen/yanic/cmd.VERSION=$(git describe --tags)" -v -o yanic_${{ matrix.arch }}_${{ matrix.os }} env: + GOOS: ${{ matrix.os }} + GOARCH: ${{ matrix.arch }} CGO_ENABLED: 0 - name: Archive build artifacts uses: actions/upload-artifact@v4 with: - name: build - path: yanic + name: build-${{ matrix.arch }}-${{ matrix.os }} + path: yanic_* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e4308de..409de615 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ on: permissions: contents: read # for checkout + attestations: read # for artifacts download jobs: release: @@ -40,10 +41,11 @@ jobs: - name: Download build artifacts uses: actions/download-artifact@v4 with: - pattern: build* + pattern: build-* path: build/ merge-multiple: true - run-id: ${{ github.event.workflow_run.workflow_id }} + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Release env: