Skip to content

update workflow

update workflow #3

Workflow file for this run

name: Build Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.6
- name: Update Version
run: |
chmod +x update-version.sh
./update-version.sh
- name: Build for Linux
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.repository_owner }}-${{ github.repository_name }}-linux-amd64
- name: Build for Windows
run: GOOS=windows GOARCH=amd64 go build -o ${{ github.repository_owner }}-${{ github.repository_name }}-windows-amd64.exe
- name: Build for macOS
run: GOOS=darwin GOARCH=amd64 go build -o ${{ github.repository_owner }}-${{ github.repository_name }}-darwin-amd64
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false