mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 12:52:45 +00:00
38 lines
917 B
YAML
38 lines
917 B
YAML
name: release
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '^1.23'
|
|
id: go
|
|
- name: Build
|
|
run: |
|
|
for i in linux-amd64 linux-arm64 linux-riscv64 linux-loong64; do
|
|
make ARCH=$i all
|
|
tar -cz --numeric-owner --owner root --group root -f tunasync-$i-bin.tar.gz -C build-$i tunasync tunasynctl
|
|
done
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag_name: ${{ github.ref_name }}
|
|
name: Release ${{ github.ref_name }}
|
|
prerelease: false
|
|
files: |
|
|
tunasync-*.tar.gz
|