Skip to content

Commit

Permalink
Add GitHub Actions workflow for building and releasing Linodsync binary
Browse files Browse the repository at this point in the history
  • Loading branch information
sanda0 committed Jan 12, 2025
1 parent bcde360 commit 419ae10
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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.20

- 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 }}

0 comments on commit 419ae10

Please sign in to comment.