Skip to content

Version Helm Plugin (#22) #16

Version Helm Plugin (#22)

Version Helm Plugin (#22) #16

Workflow file for this run

name: Release
on:
push:
branches:
- 'main'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.commits[0].message, 'Version Helm Plugin') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install YQ
uses: dcarbone/[email protected]
- name: Get Version
run: |
version=$(yq -r .version plugin.yaml)
echo "version=$version" >> $GITHUB_OUTPUT;
echo "version=$version";
id: version
- name: Tag Commit
run: |
git tag -f ${{ steps.version.outputs.version }} $(git rev-parse HEAD)
git push origin refs/tags/${{ steps.version.outputs.version }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}