diff options
author | Tormod Alf Try Tufteland <moddad@gmail.com> | 2022-06-30 20:39:48 +0200 |
---|---|---|
committer | Thomas Buckley-Houston <tom@tombh.co.uk> | 2022-07-01 09:17:12 -0300 |
commit | 8d321c47a1afe5bc9e255c58958cecabff8568a3 (patch) | |
tree | ee6c0a33f2f7abeb6972fef7c5ed2e6968cc9bc7 | |
parent | 094d7b837f34731dadffa9182e591651dd67fc48 (diff) |
feat: github action for cross-compiling releases
-rw-r--r-- | .github/workflows/build.yml | 9 | ||||
-rw-r--r-- | .github/workflows/release.yml | 30 | ||||
-rwxr-xr-x | interfacer/contrib/build_browsh.sh | 2 |
3 files changed, 36 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7397b0..061faac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,17 +8,18 @@ jobs: GOBIN: ${{ github.workspace }}/bin steps: - name: Checkout - uses: actions/checkout@main + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup go uses: actions/setup-go@v3 with: go-version: 1.18.x - - name: Install go-bindata - run: go install github.com/kevinburke/go-bindata/go-bindata@latest - - name: Build + - name: Pre-build run: ./interfacer/contrib/build_browsh.sh + - name: Build + working-directory: ./interfacer + run: go build ./cmd/browsh - name: Test run: ./interfacer/browsh --version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4ea358c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Browsh + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 + goos: [linux, windows, darwin] + goarch: ["386", amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + - goarch: arm64 + goos: windows + steps: + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.29 + with: + pre_command: "./interfacer/contrib/build_browsh.sh" + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: 1.18 + project_path: "./interfacer/cmd/browsh" + binary_name: "browsh" + extra_files: LICENSE README.md diff --git a/interfacer/contrib/build_browsh.sh b/interfacer/contrib/build_browsh.sh index 55fb159..8ae4c63 100755 --- a/interfacer/contrib/build_browsh.sh +++ b/interfacer/contrib/build_browsh.sh @@ -37,4 +37,4 @@ XPI_FILE=$xpi_file BIN_FILE=$destination \ $INTERFACER_ROOT/contrib/xpi2bin.sh # The actual build iteself -go build ./cmd/browsh +# go build ./cmd/browsh |