Skip to content

Commit

Permalink
Slimmer build size
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Feb 14, 2024
1 parent 3999d76 commit c61f952
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build Binary
run: make build-ci
Expand All @@ -41,8 +41,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/proxy-fix-linux-amd64
asset_name: proxy-fix-linux-amd64
asset_path: ./build/proxy-fix-linux-amd64.tar.gz
asset_name: proxy-fix-linux-amd64.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release Asset ARM64
Expand All @@ -52,6 +52,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/proxy-fix-linux-arm64
asset_name: proxy-fix-linux-arm64
asset_path: ./build/proxy-fix-linux-arm64.tar.gz
asset_name: proxy-fix-linux-arm64.tar.gz
asset_content_type: application/octet-stream
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ build:
chmod +x ./build/proxy-fix

build-ci:
env GOOS=linux GOARCH=amd64 go build -o ./build/proxy-fix-linux-amd64 ./...
env GOOS=linux GOARCH=arm64 go build -o ./build/proxy-fix-linux-arm64 ./...
env GOOS=linux GOARCH=amd64 go build -o ./build/proxy-fix-linux-amd64 -ldflags="-w -s" ./...
env GOOS=linux GOARCH=arm64 go build -o ./build/proxy-fix-linux-arm64 -ldflags="-w -s" ./...
tar -zcvf ./build/proxy-fix-linux-amd64.tar.gz ./build/proxy-fix-linux-amd64
tar -zcvf ./build/proxy-fix-linux-arm64.tar.gz ./build/proxy-fix-linux-arm64

run:
env PORT=8080 go run . bun ./test/app.ts

0 comments on commit c61f952

Please sign in to comment.