Skip to content

Merge pull request #26 from SerRichard/remove-tag-from-assets #19

Merge pull request #26 from SerRichard/remove-tag-from-assets

Merge pull request #26 from SerRichard/remove-tag-from-assets #19

Workflow file for this run

name: Build and Release
permissions:
contents: write
on:
push:
tags:
- '*.*.*'
jobs:
build:
name: Build Binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build Binary
run: |
mkdir -p dist/
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/proteus-${{ matrix.goos }}-${{ matrix.goarch }} ./cli
- name: Compress Binary
if: matrix.goos != 'windows'
run: gzip dist/proteus-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Install GitHub CLI
run: sudo apt-get install gh -y
- name: Upload Release Asset (Linux and macOS)
if: matrix.goos != 'windows'
run: |
gh release upload ${{ github.ref_name }} dist/proteus-${{ matrix.goos }}-${{ matrix.goarch }}.gz --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset (Windows)
if: matrix.goos == 'windows'
run: |
gh release upload ${{ github.ref_name }} dist/proteus-${{ matrix.goos }}-${{ matrix.goarch }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}