Skip to content

Commit

Permalink
Update build-go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
csznet authored Oct 21, 2023
1 parent 3bf2dfe commit 5b2a8a1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/build-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -57,4 +80,4 @@ jobs:
with:
context: .
push: true
tags: csznet/tgstate:latest
tags: csznet/tgstate:latest

0 comments on commit 5b2a8a1

Please sign in to comment.