diff --git a/.github/workflows/build-go.yml b/.github/workflows/build-go.yml index 3435ebb..e975d0e 100644 --- a/.github/workflows/build-go.yml +++ b/.github/workflows/build-go.yml @@ -24,6 +24,19 @@ jobs: - name: Download dependencies run: go mod tidy + - name: Build Linux arm64 + run: | + CGO_ENABLED=0 GOARCH=amd64 go build -o tgState main.go + + - name: Zip Linux amd64 + run: | + sudo apt-get install -y zip + zip tgState_arm64.zip tgState + + - name: Delete tgState arm64 + run: | + rm tgState + - name: Build Linux amd64 run: | CGO_ENABLED=0 go build -o tgState main.go @@ -42,6 +55,16 @@ jobs: asset_path: ./tgState.zip asset_name: tgState.zip asset_content_type: application/zip + + - name: Upload server asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./tgState_arm64.zip + asset_name: tgState_arm64.zip + asset_content_type: application/zip - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -57,4 +80,4 @@ jobs: with: context: . push: true - tags: csznet/tgstate:latest \ No newline at end of file + tags: csznet/tgstate:latest