refactor: reorganize project in order to include automation #1
2 changed files with 31 additions and 1 deletions
29
.forgejo/workflows/build.yaml
Normal file
29
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build project
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull-request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: [debian-12]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [ '1.21', '1.22' ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Go ${{ matrix.go-version }}
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
|
||||||
|
- name: Build plugins
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
./build.sh
|
3
build.sh
3
build.sh
|
@ -7,8 +7,9 @@ for arch in 386 amd64; do
|
||||||
for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do
|
for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do
|
||||||
pushd $d >/dev/null
|
pushd $d >/dev/null
|
||||||
xn="$(basename "$d")"
|
xn="$(basename "$d")"
|
||||||
|
GOARCH=$arch go get .
|
||||||
GOARCH=$arch go build
|
GOARCH=$arch go build
|
||||||
/bin/mv "$xn" ../../bin/$arch
|
/bin/mv "$xn" ../../bin/$arch
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue