mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 11:42:43 +00:00
ci: update release.yml
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
parent
a6a03decf0
commit
181fddb87c
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@ -1,46 +1,37 @@
|
|||||||
name: release
|
name: release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Sequence of patterns matched against refs/tags
|
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '^1.22'
|
go-version: '^1.22'
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
for i in linux-amd64 linux-arm64 linux-riscv64 linux-loong64; do
|
for i in linux-amd64 linux-arm64 linux-riscv64 linux-loong64; do
|
||||||
make ARCH=$i all
|
make ARCH=$i all
|
||||||
tar -cz --numeric-owner --owner root --group root -f tunasync-$i-bin.tar.gz -C build-$i tunasync tunasynctl
|
tar -cz --numeric-owner --owner root --group root -f tunasync-$i-bin.tar.gz -C build-$i tunasync tunasynctl
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
release_name: Release ${{ github.ref }}
|
tag_name: ${{ github.ref_name }}
|
||||||
draft: false
|
name: Release ${{ github.ref_name }}
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload Release Assets
|
files: |
|
||||||
env:
|
tunasync-*.tar.gz
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
TAG_NAME: ${{ github.ref }}
|
|
||||||
run: |
|
|
||||||
hub release edit $(find . -type f -name "tunasync-*.tar.gz" -printf "-a %p ") -m "" "${TAG_NAME##*/}"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user