Skip to content

Commit

Permalink
Merge pull request #61 from flipt-io/gm/release-artifacts
Browse files Browse the repository at this point in the history
feat(github): add cup release upload step
  • Loading branch information
GeorgeMac authored Aug 28, 2023
2 parents 2220c91 + 1589ca8 commit 38de700
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,56 @@ name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest

upload-cup:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
strategy:
matrix:
include:
- runner: ubuntu-latest
os: linux
arch: amd64
- runner: ubuntu-latest
os: linux
arch: arm64
- runner: macos-latest
os: darwin
arch: amd64
- runner: macos-latest
os: darwin
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21'

- uses: actions/checkout@v3

- name: Prepare Directory
run: mkdir bin

- name: Build Cup
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go build -o bin/. ./cmd/cup/...

- name: Archive Cup
working-directory: bin
run: tar -a -cvf cup_${{ matrix.os }}_${{ matrix.arch }}.tar.gz cup

- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release_please.outputs.tag_name }} ./bin/cup_${{ matrix.os }}_${{ matrix.arch }}.tar.gz

0 comments on commit 38de700

Please sign in to comment.