Skip to content

Commit

Permalink
Add linux arm releaser (#4)
Browse files Browse the repository at this point in the history
* add linux arm goreleaser

* use special go install for arm (not supported by setup-go)

* increase goreleaser timeout

* update readme
  • Loading branch information
tenyo authored Oct 25, 2021
1 parent da26b4e commit 3da7b23
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ jobs:
goreleaser:
strategy:
matrix:
os: [ubuntu-latest, ARM64]
os: [ubuntu-latest, ARM64, ARM]
include:
# specify the config file id to be executed for each different OS
- os: ubuntu-latest
build_id: "amd64"
- os: ARM64
build_id: "arm64"
- os: ARM
build_id: "arm"

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -31,12 +33,19 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.17
if: ${{ matrix.os != 'ARM' }}
-
name: Manually install Go for ARM
env:
GO_VER: go1.17.2
run: "export GOPATH=$HOME/$(date +%s) && echo $GOPATH && mkdir -p $GOPATH && curl -s -L https://golang.org/dl/${GO_VER}.linux-armv6l.tar.gz | tar -C $GOPATH -xz; export PATH=$PATH:$GOPATH/go/bin; echo \"PATH=$PATH\" >> $GITHUB_ENV; go version"
if: ${{ matrix.os == 'ARM' }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
distribution: goreleaser
version: latest
args: release --rm-dist -f .goreleaser.${{ matrix.build_id }}.yml
args: release --timeout 60m --rm-dist -f .goreleaser.${{ matrix.build_id }}.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .goreleaser.arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
builds:
-
id: arm
env:
- CGO_ENABLED=1
goos:
- linux
goarch:
- arm
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}

release:
prerelease: auto
name_template: "{{.ProjectName}}-v{{.Version}}"

checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_linux_arm_checksum.txt"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Currently brbr only works on Linux - it has a built-in Tor server (thanks to htt

Download the latest release from https://github.com/tenyo/brbr/releases/latest

For Raspberry Pi 4 you can use the `arm64` release, and for Pi 3 (32-bit) - the `armv6` one.

## Usage

### Quickstart
Expand Down

0 comments on commit 3da7b23

Please sign in to comment.