Build and release vsyncer #10
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 vsyncer | |
on: | |
release: | |
types: | |
- published | |
- edited | |
jobs: | |
build-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Setup | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build for Linux amd64 | |
run: | | |
make clean generate | |
make build/vsyncer \ | |
TAG=${{ github.event.release.tag_name }} \ | |
DOCKER_TAG=${{ github.event.release.tag_name }} \ | |
GOOS=linux \ | |
GOARCH=amd64 \ | |
USE_DOCKER="true" | |
cp build/vsyncer build/vsyncer-${{ github.event.release.tag_name }}-linux-amd64 | |
- name: Build for Windows | |
run: | | |
make clean generate | |
make build/vsyncer \ | |
TAG=${{ github.event.release.tag_name }} \ | |
DOCKER_TAG=${{ github.event.release.tag_name }} \ | |
GOOS=windows \ | |
GOARCH=amd64 \ | |
USE_DOCKER="true" | |
cp build/vsyncer build/vsyncer-${{ github.event.release.tag_name }}-windows-amd64.exe | |
- name: Build for macOS amd64 | |
run: | | |
make clean generate | |
make build/vsyncer \ | |
TAG=${{ github.event.release.tag_name }} \ | |
DOCKER_TAG=${{ github.event.release.tag_name }} \ | |
GOOS=darwin \ | |
GOARCH=amd64 \ | |
USE_DOCKER="true" | |
cp build/vsyncer build/vsyncer-${{ github.event.release.tag_name }}-darwin-amd64 | |
- name: Build for macOS arm64 | |
run: | | |
make clean generate | |
make build/vsyncer \ | |
TAG=${{ github.event.release.tag_name }} \ | |
DOCKER_TAG=${{ github.event.release.tag_name }} \ | |
GOOS=darwin \ | |
GOARCH=arm64 \ | |
USE_DOCKER="true" | |
cp build/vsyncer build/vsyncer-${{ github.event.release.tag_name }}-darwin-arm64 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: build/vsyncer-${{ github.event.release.tag_name }}-* |