build(deps): bump cloud.google.com/go/compute/metadata from 0.2.3 to 0.3.0 in the go group #43
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: Go test/lint/build/release | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
# Concurrency ensures that only a single workflow using the same concurrency group will run at a time. | |
# When a workflow is queued in the same repository and concurrency group, any workflow in progress will be cancelled. | |
# This concurrency group is keyed to the 'ref' property in the 'github' context, to map back to the branch/tag that | |
# triggered this workflow run. | |
concurrency: | |
cancel-in-progress: true | |
group: test_lint_build_release_${{ github.ref }} | |
jobs: | |
test-lint-build: | |
name: Test and lint and build | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
- macos-latest | |
steps: | |
- name: Set up Go with the latest 1.x toolchain per a SemVer caret range | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1' | |
check-latest: true | |
cache-dependency-path: '**/go.sum' | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds | |
- name: Cache between runs | |
uses: actions/cache@v4 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- if: ${{ matrix.platform == 'ubuntu-latest' }} | |
name: Update 'make' and run 'make all' on Linux | |
run: | | |
sudo apt-get update | |
sudo apt-get --only-upgrade install build-essential | |
make all | |
# Cannot use Docker on macOS runners: https://github.community/t/why-is-docker-not-installed-on-macos/17017 | |
- if: ${{ matrix.platform == 'macos-latest' }} | |
name: Install 'make' and run '.../make test' on macOS | |
run: | | |
brew install make | |
/opt/homebrew/opt/make/libexec/gnubin/make test | |
release: | |
name: Release 'v*'' tags | |
needs: test-lint-build | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ${{ github.repository }} - all history | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Confirm that the 'main' branch contains the '${{ github.ref }}' tag | |
run: > | |
git branch --all --contains '${{ github.ref }}' --no-column --format='%(refname)' | |
| grep -c '\/main$' | |
- name: Set up Go with the latest 1.x toolchain per a SemVer caret range | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1' | |
check-latest: true | |
cache-dependency-path: '**/go.sum' | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_HOMEBREW_TAPS }} |