chore: refactor build process and repository cleanup

- Introduce Go setup and caching in Docker GitHub Actions workflow
- Add `release` directory to `.gitignore`
- Remove `main.go` file from the repository

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2024-02-20 09:51:29 +08:00
parent 0d1a3ae368
commit 9d1d40c08a
3 changed files with 28 additions and 14 deletions

View File

@@ -24,6 +24,33 @@ jobs:
with:
fetch-depth: 0 # all history for all branches and tags
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-go
with:
patterns: |
go.mod
go.sum
- name: cache go
id: cache-go
uses: https://github.com/actions/cache@v3
with:
path: |
/go_path
/go_cache
key: go_path-${{ steps.hash-go.outputs.hash }
- name: Build binary
env:
TAGS: ""
run: |
make docker-build-linux-amd64
make docker-build-linux-arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v2