Skip to content

chore(CI): Configure release-please #2

chore(CI): Configure release-please

chore(CI): Configure release-please #2

Workflow file for this run

name: goreleaser
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
uses: google-github-actions/release-please-action@v4
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
goreleaser:
needs:
- release-please
if: needs.release-please.outputs.releases_created == 'true'
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: $GITHUB_ACTOR
password: ${{ secrets.GH_GORELEASER }}
-
name: Download Syft
uses: anchore/sbom-action/download-syft@v0.17.4
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_GORELEASER }}