From ea571846bad6ac5deb4d9202d63769bb8deb4052 Mon Sep 17 00:00:00 2001 From: motatoes Date: Tue, 27 Feb 2024 11:45:23 +0000 Subject: [PATCH 1/2] multiarch releases for cli --- .github/workflows/cli_release_multiarch.yml | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/cli_release_multiarch.yml diff --git a/.github/workflows/cli_release_multiarch.yml b/.github/workflows/cli_release_multiarch.yml new file mode 100644 index 000000000..bc4c91452 --- /dev/null +++ b/.github/workflows/cli_release_multiarch.yml @@ -0,0 +1,44 @@ +name: release +on: + release: + branches: + - 'go' + types: [released] +jobs: + binary: + strategy: + matrix: + arch: [arm, arm64, amd64, 386] + os: [linux, darwin, freebsd, windows] + exclude: + - os: darwin + arch: arm + - os: darwin + arch: 386 + + runs-on: ubuntu-latest + + steps: + - name: Download Go + uses: actions/setup-go@v5 + with: + go-version: 1.21.1 + id: go + + - name: Check out repository + uses: actions/checkout@v4 + - name: Build + run: | + echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}" + env GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./cli/cmd/digger + + - name: Publish linux-x64 exec to github + id: upload-release-asset-linux-x64 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: 'digger' + asset_name: digger-cli-${{matrix.os}}-${{matrix.arch}} + asset_content_type: application/octet-stream \ No newline at end of file From 847e0d2d58379d37a5a3b7c78cc8f2bb0b82ae30 Mon Sep 17 00:00:00 2001 From: motatoes Date: Tue, 27 Feb 2024 11:58:28 +0000 Subject: [PATCH 2/2] update workflow titles --- .github/workflows/cli_release.yml | 2 +- .github/workflows/cli_release_multiarch.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli_release.yml b/.github/workflows/cli_release.yml index c1b01e314..98b0dca42 100644 --- a/.github/workflows/cli_release.yml +++ b/.github/workflows/cli_release.yml @@ -1,4 +1,4 @@ -name: release +name: release cli on: release: branches: diff --git a/.github/workflows/cli_release_multiarch.yml b/.github/workflows/cli_release_multiarch.yml index bc4c91452..40decece1 100644 --- a/.github/workflows/cli_release_multiarch.yml +++ b/.github/workflows/cli_release_multiarch.yml @@ -1,4 +1,4 @@ -name: release +name: release cli multi architecture on: release: branches: