Added version comparison to setup ordering. #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
platform: [darwin, linux, windows] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Install dependencies | |
run: go get . | |
- name: Build Binary | |
run: GOOS=${{ matrix.platform }} GOARCH=amd64 go build -o cbdinocluster-${{ matrix.platform }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: cbdinocluster-${{ matrix.platform }} | |
path: cbdinocluster-${{ matrix.platform }} | |
publish: | |
name: Publish | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cbdinocluster-linux | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cbdinocluster-darwin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cbdinocluster-windows | |
- name: Rename Windows Binary | |
run: mv cbdinocluster-windows cbdinocluster-windows.exe | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
cbdinocluster-darwin | |
cbdinocluster-linux | |
cbdinocluster-windows.exe |