Skip to content

add cleanup to action for self hosted runner (#760) #2

add cleanup to action for self hosted runner (#760)

add cleanup to action for self hosted runner (#760) #2

name: Release Drafter
on:
push:
branches:
- main
- releases/*
permissions:
contents: read
# The release-drafter action adds PR titles to the release notes once these are merged to main.
# A draft release is kept up-to-date listing the changes for the next minor release version.
jobs:
update_release_draft:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Set Version
run: |
RELEASE_VERSION=v$(go run $GITHUB_WORKSPACE/pkg/version/generate print-version)
echo "release version is $RELEASE_VERSION"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- name: Drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{env.RELEASE_VERSION }}
version: ${{env.RELEASE_VERSION }}