forked from 1orz/My-action
-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (137 loc) · 4.71 KB
/
Build-Golang-Project.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Build-Golang-Project
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
jobs:
Gogs:
name: Build Gogs
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15.6
uses: actions/setup-go@v2
with:
go-version: 1.15.6
- name: Use Node.js 14.15.3
uses: actions/setup-node@v2
with:
node-version: 14.15.3
- name: Clone Gogs From Github and Build
if: success()
run: |
git clone https://github.com/gogs/gogs.git
sudo apt update -qq
sudo apt install -qq upx libpam0g-dev
cd gogs
node -v
go version
go build -tags "sqlite pam cert" -o gogs
- name: UPX Binary Files to Reduce Size.
if: success()
run: |
cd gogs
upx -9 gogs -q
- name: Upload Flies to Github Actions
uses: actions/upload-artifact@v2
if: success()
with:
name: Gogs
path: gogs/gogs
- name: Upload Gogs's Binary Files to Main Download Station.
if: success()
run: |
cd gogs
zip -o Gogs.zip gogs
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/Linux/Gogs" -F "[email protected]" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
# curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/ALL/Gogs" -F "[email protected]" ${{ secrets.CN_STATION_PROCESSOR }}
Gitea:
name: Build Gitea
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15.6
uses: actions/setup-go@v2
with:
go-version: 1.15.6
- name: Use Node.js 14.15.3
uses: actions/setup-node@v2
with:
node-version: 14.15.3
- name: Clone Gitea From Github and Build
run: |
git clone https://github.com/go-gitea/gitea.git
cd gitea
node -v
go version
TAGS="bindata sqlite sqlite_unlock_notify" make build
- name: UPX Binary Files to Reduce Size.
if: success()
run: |
cd gitea
upx -9 gitea -q
- name: Upload Flies to Github Actions
uses: actions/upload-artifact@v2
if: success()
with:
name: Gitea
path: gitea/gitea
- name: Upload Gitea's Binary Files to Main Download Station.
if: success()
run: |
cd gitea
zip -o Gitea.zip gitea
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/Linux/Gitea" -F "[email protected]" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
# curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/ALL/Gitea" -F "[email protected]" ${{ secrets.CN_STATION_PROCESSOR }}
Nps:
name: Build Nps
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15.6
uses: actions/setup-go@v2
with:
go-version: 1.15.6
- name: Clone Nps From Github and Build
run: |
git clone https://github.com/ehang-io/nps.git
cd nps
go version
bash <(curl -fsSL https://raw.githubusercontent.com/1orz/My-action/master/Golang-Project/Nps/build.sh)
- name: Upload Flies to Github Actions
uses: actions/upload-artifact@v2
if: success()
with:
name: Nps
path: nps/*.tar.gz
- name: Upload Nps's Binary Files to Main Download Station.
if: success()
run: |
cd nps
zip -r -o Nps.zip . -i *.tar.gz
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/Linux/Nps" -F "[email protected]" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
# curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/ALL/Nps" -F "[email protected]" ${{ secrets.CN_STATION_PROCESSOR }}
Frp:
name: Build Frp
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15.6
uses: actions/setup-go@v2
with:
go-version: 1.15.6
- name: Clone Frp From Github and Build
run: |
git clone https://github.com/fatedier/frp.git
cd frp
go version
bash package.sh
- name: Upload Flies to Github Actions
uses: actions/upload-artifact@v2
if: success()
with:
name: Frp
path: frp/release/packages/
- name: Upload Frp's Binary Files to Main Download Station.
if: success()
run: |
cd frp/release/packages
zip -r -o Frp.zip .
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/Linux/Frp" -F "[email protected]" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
# curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Software/ALL/Frp" -F "[email protected]" ${{ secrets.CN_STATION_PROCESSOR }}