Bump actions/setup-go from 5.1.0 to 5.2.0 #135
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: Release | |
on: | |
workflow_call: | |
inputs: | |
description: | |
description: 'Description of the project for the goreleaser tap' | |
required: false | |
type: string | |
default: '' | |
binary_name: | |
description: 'Name of the binary to be released' | |
required: false | |
type: string | |
default: ${{ github.event.repository.name }} | |
main_path: | |
description: 'Path to the binary main package, eg ./cmd/foo' | |
required: false | |
type: string | |
default: "." | |
dockerfile: | |
description: 'Path to the Dockerfile to be used for the release (for multi binary projects)' | |
required: false | |
type: string | |
default: "./Dockerfile" | |
secrets: | |
DOCKER_USER: | |
required: true | |
DOCKER_TOKEN: | |
required: true | |
GH_PAT: | |
required: true | |
push: | |
tags: | |
# so a vX.Y.Z-test1 doesn't trigger build | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-pre[0-9]*' | |
- 'v[0-9]+.[0-9]+.[0-9]+\+' | |
pull_request: | |
# To test | |
branches: [ main ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
- name: Common Setup | |
id: common_setup | |
uses: fortio/workflows/.github/actions/common_setup@main # change back to @main after testing changes in a branch | |
with: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
- name: Available platforms | |
run: | | |
echo "Platforms found: ${{ steps.common_setup.outputs.platforms }}" | |
- name: Set up Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # pin@v5 | |
with: | |
go-version: '1.23' | |
check-latest: true | |
- name: Download goreleaser config | |
run: curl -fsS -o .goreleaser.yaml https://raw.githubusercontent.com/fortio/workflows/main/goreleaser.yaml # same use branch for testing instead of main in #38 | |
- name: "GoReleaser Action" | |
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # pin@v6 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
TAP_DESCRIPTION: ${{ inputs.description }} | |
GOWORK: off | |
BINARY_NAME: ${{ inputs.binary_name }} | |
MAIN_PATH: ${{ inputs.main_path }} | |
DOCKERFILE: ${{ inputs.dockerfile }} |