Skip to content

Commit

Permalink
Create gothub.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai authored Apr 20, 2024
1 parent 693fc6e commit a22b9e3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/gothub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 ../../
cd ../../
tar -czvf gothub_linux_x86_64.tar.gz gothub/gothub_linux_x86_64
zip gothub_windows_x86_64.zip gothub/gothub_windows_x86_64.exe
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

0 comments on commit a22b9e3

Please sign in to comment.