Skip to content

Commit

Permalink
ci: add go release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Sep 10, 2023
1 parent dad79e0 commit 0eb719e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Go - Release

on:
push:
branches:
- add-release-workflow

permissions:
contents: read

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
pull-requests: write
steps:
- name: Release Please
uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: go
package-name: kustomize-plugin-merger
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '1.21'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0eb719e

Please sign in to comment.