Skip to content

Update Go version in GitHub Actions workflow to 1.22.2 #4

Update Go version in GitHub Actions workflow to 1.22.2

Update Go version in GitHub Actions workflow to 1.22.2 #4

Workflow file for this run

name: Build and Release Linodsync Binary
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
name: Build Static Linux Binary
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.2"
- name: Install dependencies
run: go mod tidy
- name: Build static binary for Linux amd64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o linodsync
mkdir -p build
mv linodsync build/
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
files: build/linodsync
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}