Skip to content

Merge pull request #9 from SerRichard/another-release-patch #3

Merge pull request #9 from SerRichard/another-release-patch

Merge pull request #9 from SerRichard/another-release-patch #3

Workflow file for this run

name: Build and Release
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: Upload Release Asset
uses: actions/upload-artifact@v3
with:
name: proteus-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/proteus-${{ matrix.goos }}-${{ matrix.goarch }}*
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: dist/
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: proteus/dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}