diff --git a/.github/workflows/go-pre-release.yml b/.github/workflows/go-pre-release.yml new file mode 100644 index 0000000..db99bc9 --- /dev/null +++ b/.github/workflows/go-pre-release.yml @@ -0,0 +1,48 @@ +name: Go - Pre Release + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + pre-release: + name: Pre Release + runs-on: ubuntu-latest + permissions: + actions: write + contents: write + pull-requests: write + steps: + - name: Run Release Please + uses: GoogleCloudPlatform/release-please-action@ca6063f4ed81b55db15b8c42d1b6f7925866342d # v3 + id: release + with: + release-type: go + package-name: kustomize-plugin-merger + changelog-types: | + [ + { + "type": "feat", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "docs", + "section": "Documentation", + "hidden": false + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": false + } + ] diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml new file mode 100644 index 0000000..01c925e --- /dev/null +++ b/.github/workflows/go-release.yml @@ -0,0 +1,39 @@ +name: Go - Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: { } + +permissions: + contents: read + +jobs: + release: + name: Release + permissions: + contents: write + packages: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 + with: + go-version: '1.21' + - name: Login to GitHub Container Registry + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: latest + args: release --clean