forked from zhaojh329/rttys
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (54 loc) · 1.7 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-20.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-20.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