Release #35
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_dispatch: | |
inputs: | |
tagVersion: | |
description: "Tag version to release" | |
required: true | |
type: string | |
workDir: | |
description: "Directory where the go.mod file is located" | |
required: true | |
type: string | |
checkoutTag: | |
description: "Tag to checkout in the code repo" | |
required: true | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubicloud-standard-8-arm | |
steps: | |
- name: Checkout porter-dev/code at ${{ github.event.inputs.checkoutTag }} | |
uses: actions/checkout@v4 | |
with: | |
repository: porter-dev/code | |
ref: ${{ github.event.inputs.checkoutTag }} | |
token: ${{ secrets.PORTERSUPPORT_GITHUB_TOKEN }} | |
fetch-tags: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ${{ github.event.inputs.workDir }}/go.mod | |
cache-dependency-path: ${{ github.event.inputs.workDir }}/go.sum | |
- name: Docker logins | |
run: echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin | |
env: | |
GITHUB_TOKEN: ${{ secrets.PORTERSUPPORT_GITHUB_TOKEN }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
workdir: ${{ github.event.inputs.workDir }} | |
distribution: goreleaser | |
version: v2 | |
args: release --clean --parallelism=4 --skip validate | |
env: | |
GITHUB_TOKEN: ${{ secrets.PORTERSUPPORT_GITHUB_TOKEN }} | |
GORELEASER_CURRENT_TAG: ${{ github.event.inputs.tagVersion }} |