Skip to content

Use GitHub actions to upload release artifacts #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on:
release:
types:
- created

name: Build Release
jobs:
release-linux-amd64:
name: x86_64 Linux release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release
- run: go build -v -o cloud-agent-linux-amd64
env:
GOARCH: amd64
GOOS: linux
- run: hub release edit -m "" -a ./cloud-agent-linux-amd64 $(echo $GITHUB_REF | cut -d/ -f3)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-linux-arm64:
name: ARM64 Linux release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release
- run: go build -v -o cloud-agent-linux-arm64
env:
GOARCH: arm64
GOOS: linux
- run: hub release edit -m "" -a ./cloud-agent-linux-arm64 $(echo $GITHUB_REF | cut -d/ -f3)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-macos-amd64:
name: x86_64 macOS release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release
- run: go build -v -o cloud-agent-macos-amd64
env:
GOARCH: amd64
GOOS: darwin
- run: hub release edit -m "" -a ./cloud-agent-macos-amd64 $(echo $GITHUB_REF | cut -d/ -f3)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-macos-arm64:
name: ARM64 macOS release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release
- run: go build -v -o cloud-agent-macos-arm64
env:
GOARCH: arm64
GOOS: darwin
- run: hub release edit -m "" -a ./cloud-agent-macos-arm64 $(echo $GITHUB_REF | cut -d/ -f3)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}