Skip to content

Commit

Permalink
add more prebuilt binaries in releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Apr 1, 2024
1 parent eba68e3 commit 103b793
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,35 @@ on:
jobs:
static:
runs-on: ubuntu-latest
container:
image: debian:bookworm-slim
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '>=1.22.0'
- run: |
apt-get update -qq
apt-get install -y --no-install-recommends ca-certificates gcc libc6-dev
- run: |
go generate ./migrations
go vet ./...
(cd /tmp && go install honnef.co/go/tools/cmd/staticcheck@latest)
~/go/bin/staticcheck ./...
go test ./... -failfast -vet off -tags netgo,sqlite_omit_load_extension,fts5 -race
- run: go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags -static -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }}" -trimpath ./cmd/tootik
- run: |
go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags -static -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }}" -trimpath -o tootik-amd64 ./cmd/tootik
- run: |
apt-get install -y gcc-aarch64-linux-gnu
GOARCH=arm64 CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags -static -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }}" -trimpath -o tootik-arm64 ./cmd/tootik
- run: |
apt-get install -y gcc-arm-linux-gnueabihf
GOARCH=arm CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags -static -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }}" -trimpath -o tootik-arm ./cmd/tootik
- run: |
apt-get install -y gcc-multilib
GOARCH=386 CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags -static -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }}" -trimpath -o tootik-386 ./cmd/tootik
- uses: actions/upload-artifact@v4
with:
name: tootik-${{ inputs.version }}
path: tootik
path: tootik-*
retention-days: 1
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: tootik-${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
path: artifacts
- uses: softprops/action-gh-release@v2
with:
files: tootik
files: artifacts/tootik-*
fail_on_unmatched_files: true

0 comments on commit 103b793

Please sign in to comment.