Skip to content

Common setup

Common setup #1

Workflow file for this run

name: Release
on:
workflow_call:
inputs:
description:
description: 'Description of the project for the goreleaser tap'
required: false
type: string
default: ''
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*'
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
uses: fortio/workflows/.github/actions/common_setup@common_setup
with:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5 # pin@v3
with:
go-version: '1.21'
check-latest: true
- name: Download goreleaser config
run: curl -fsS -o .goreleaser.yaml https://raw.githubusercontent.com/fortio/workflows/main/goreleaser.yaml
- name: "GoReleaser Action"
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # [email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
TAP_DESCRIPTION: ${{ inputs.description }}