Skip to content

release

release #10

Workflow file for this run

name: release
on:
push:
branches:
- "release/**"
pull_request:
branches:
- main
- "release/**"
- "v1.x"
workflow_dispatch:
inputs:
tags:
description: "Tag for manual workflow run"
required: true
type: string
permissions:
contents: write
issues: write
pull-requests: write
jobs:
# release-please:
release:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout the Repository
with:
fetch-depth: 0
# - uses: googleapis/release-please-action@v4
# id: release
# with:
# token: ${{ secrets.GH_TOKEN }}
# config-file: release-please-config.json
# manifest-file: .release-please-manifest.json
- name: Set up Go
# if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: true
- name: Run GoReleaser
# if: ${{ steps.release.outputs.release_created }}
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Tag major and minor versions
# if: ${{ steps.release.outputs.release_created }}
# run: |-
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# # Update tags locally
# git tag -d v${{ steps.release.outputs.major }} || true
# git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
# # Push deletion to origin
# git push origin :refs/tags/v${{ steps.release.outputs.major }} || true
# git push origin :refs/tags/v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
# # Create and push new tags
# git tag v${{ steps.release.outputs.major }}
# git tag v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
# git push origin --tags