Skip to content

Build & Release

Build & Release #2

name: Build & Release
on:
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
path: "src"
- name: "Build for Windows"
run: |
cd src
GOOS=windows GOARCH=amd64 go build -o combo-gen-windows-amd64.exe
- name: "Build for Linux"
run: |
cd src
go build -o combo-gen-linux-amd64
- name: "Upload Artifacts"
uses: actions/upload-artifact@v2
with:
name: combo-gen-artifacts
path: |
src/combo-gen-windows-amd64.exe
src/combo-gen-linux-amd64
release:
needs: build-and-release
runs-on: ubuntu-latest
steps:
- name: "Download Artifacts"
uses: actions/download-artifact@v2
with:
name: combo-gen-artifacts
path: src
- name: "Rename Artifacts"
run: |
mv src/combo-gen-windows-amd64.exe src/combo-gen-windows.exe
mv src/combo-gen-linux-amd64 src/combo-gen-linux
- name: "Make Release"
uses: softprops/action-gh-release@v1
with:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
generate_release_notes: true
files: |
src/combo-gen-windows.exe
src/combo-gen-linux