Excavator: Manage go version #965
Workflow file for this run
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 | |
on: | |
push: | |
branches: [master] | |
tags-ignore: | |
- '**' | |
pull_request: | |
branches: [master] | |
release: | |
types: [published] | |
jobs: | |
Verify: | |
runs-on: ubuntu-latest | |
env: | |
GOPATH: /home/runner/go | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set Go version | |
id: go_version | |
run: | | |
GO_VERSION=$(cat .palantir/go-version | sed 's/^go//' ) | |
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ steps.go_version.outputs.version }} | |
- name: Cache Godel assets | |
uses: actions/cache@v2 | |
with: | |
path: ~/.godel | |
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }} | |
restore-keys: | | |
${{ runner.os }}-godel- | |
- name: Verify | |
run: ./godelw verify --apply=false | |
Dist: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
env: | |
GOPATH: /home/runner/go | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set Go version | |
id: go_version | |
run: | | |
GO_VERSION=$(cat .palantir/go-version | sed 's/^go//' ) | |
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ steps.go_version.outputs.version }} | |
- name: Cache Godel assets | |
uses: actions/cache@v2 | |
with: | |
path: ~/.godel | |
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }} | |
restore-keys: | | |
${{ runner.os }}-godel- | |
- name: Build distribution | |
run: ./godelw dist | |
- name: Archive distribution | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: | | |
out/dist/bouncer/*/os-arch-bin/*.tgz | |
# | |
# Steps after this point should only run when publishing | |
# Include them here to avoid exporting the Docker container as an artifact | |
# | |
- name: Publish release assets | |
if: ${{ github.event_name == 'release' }} | |
run: ./godelw publish github --add-v-prefix --api-url=${GITHUB_API_URL} --user=palantir --repository=bouncer --token=${{ secrets.GITHUB_TOKEN }} | |
ci-all: | |
runs-on: ubuntu-latest | |
needs: | |
- Verify | |
- Dist | |
steps: | |
- name: Complete | |
run: exit 0 |