mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-21 10:03:28 +00:00
35a306dfd9
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20'
|
|
|
|
- id: get-version
|
|
uses: battila7/get-version-action@v2
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- id: build
|
|
run: |
|
|
cd ui
|
|
npm install
|
|
npm run build
|
|
cd ..
|
|
|
|
version=${{ steps.get-version.outputs.version-without-v }}
|
|
|
|
./build.sh linux amd64
|
|
./build.sh linux arm64
|
|
|
|
cp rttys.conf rttys.service rttys-linux-amd64
|
|
cp rttys.conf rttys.service rttys-linux-arm64
|
|
|
|
mv rttys-linux-amd64 rttys-linux-amd64-$version
|
|
mv rttys-linux-arm64 rttys-linux-arm64-$version
|
|
|
|
tar zcf rttys-linux-amd64-$version.tar.gz rttys-linux-amd64-$version
|
|
tar zcf rttys-linux-arm64-$version.tar.gz rttys-linux-arm64-$version
|
|
|
|
- uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
draft: true
|
|
prerelease: false
|
|
files: rttys-*.tar.gz
|
|
docker:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- id: get-version
|
|
uses: battila7/get-version-action@v2
|
|
|
|
- uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
tags: |
|
|
${{ secrets.DOCKERHUB_USERNAME }}/rttys:${{ steps.get-version.outputs.version-without-v }}
|
|
${{ secrets.DOCKERHUB_USERNAME }}/rttys:latest
|