Skip to content

Commit

Permalink
Added release building GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
brett19 committed Mar 13, 2020
1 parent c8f99e4 commit 9b4a8ee
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
push:
tags:
- "v*"
name: Build and Upload Releases
jobs:
build:
name: Build and Upload
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: ^1.13.1
- name: Build project
run: |
GOOS=darwin GOARCH=amd64 go build -o cbdynclusterd-macos
GOOS=linux GOARCH=amd64 go build -o cbdynclusterd-linux
GOOS=windows GOARCH=amd64 go build -o cbdynclusterd-windows.exe
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
tag_name: "${{ github.ref }}"
release_name: "Release ${{ github.ref }}"
draft: false
prerelease: false
- name: Upload Linux Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: "${{ steps.create_release.outputs.upload_url }}"
asset_path: ./cbdynclusterd-linux
asset_name: cbdynclusterd-linux
asset_content_type: application/octet-stream
- name: Upload OSX Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: "${{ steps.create_release.outputs.upload_url }}"
asset_path: ./cbdynclusterd-macos
asset_name: cbdynclusterd-macos
asset_content_type: application/octet-stream
- name: Upload Windows Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: "${{ steps.create_release.outputs.upload_url }}"
asset_path: ./cbdynclusterd-windows.exe
asset_name: cbdynclusterd-windows.exe
asset_content_type: application/octet-stream

0 comments on commit 9b4a8ee

Please sign in to comment.