Build Go tools #644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Go tools | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- gotip | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 12 * * *" | |
jobs: | |
go-tools: | |
name: Build Go Tools | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, darwin] | |
goarch: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Init Hermit | |
run: ./bin/hermit env --raw >> $GITHUB_ENV | |
- name: Build Go | |
run: make GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} -C go-tools build | |
- name: Upload Versioned | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: go-tools | |
allowUpdates: true | |
replacesArtifacts: false | |
artifacts: "go-tools/*.bz2" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Unversioned | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: go-tools | |
allowUpdates: true | |
replacesArtifacts: true | |
artifacts: "go-tools/unversioned/*.bz2" | |
token: ${{ secrets.GITHUB_TOKEN }} |