-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (36 loc) · 1.56 KB
/
gothub.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
name: GotHub build
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- run: sudo apt-get install -y ca-certificates git tar zip
- uses: actions/setup-go@v4
- run: |
mkdir gothub
cd gothub/
git clone https://codeberg.org/gothub/gothub.git
cd gothub/
git checkout master
GOARCH=amd64 GOOS=linux go build -o gothub_linux_x86_64 -ldflags="-X codeberg.org/gothub/gothubs/utils.Branch=$(git rev-parse --abbrev-ref HEAD)"
mv gothub_linux_x86_64 ../
GOARCH=amd64 GOOS=linux go build -o gothub_windows_x86_64.exe -ldflags="-X codeberg.org/gothub/gothubs/utils.Branch=$(git rev-parse --abbrev-ref HEAD)"
mv gothub_windows_x86_64.exe ../
mv views/ ../../
mv public/ ../../
cd ../../
tar -czvf gothub_linux_x86_64.tar.gz gothub/gothub_linux_x86_64 gothub/views gothub/public
zip gothub_windows_x86_64.zip gothub/gothub_windows_x86_64.exe gothub/views/* gothub/public/*
mv gothub_linux_x86_64.tar.gz binaries/
mv gothub_windows_x86_64.zip binaries/
rm -fr gothub/
- run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update SimplyTranslate binaries"
- uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main