Skip to content

CI/CD

CI/CD #2

Workflow file for this run

name: release
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
permissions:
contents: write
env:
GO_VERSION: "1.22"
jobs:
goreleaser:
runs-on: personal
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Tidy Go Mod
run: go mod tidy
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Run GoReleaser
if: success() && startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}