Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
CI: Draft a release on tag pushes
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <thetredev@gmail.com>
  • Loading branch information
thetredev committed Oct 4, 2023
1 parent db5a69b commit fea5b4d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build-push-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,23 @@ jobs:
docker push ${GHCR_PREFIX}/${REGISTRY_IMAGE}:${docker_image}-${{ github.ref_name }}
docker push ${DOCKER_HUB_PREFIX}/${REGISTRY_IMAGE}:${docker_image}-${{ github.ref_name }}
done
# Copied and modified from k0sctl: https://github.com/k0sproject/k0sctl/blob/main/.github/workflows/release.yaml
## Ugly hack to get the tag name
## github.ref gives the full reference like refs.tags.v0.0.1-beta1
- name: Get branch name to draft release
if: ${{ inputs.tag }}
id: branch_name
run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT}
- name: Draft release
if: ${{ inputs.tag }}
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: "${{ steps.branch_name.outputs.TAG_NAME }}"
tag_name: ${{ steps.branch_name.outputs.TAG_NAME }}
name: ${{ steps.branch_name.outputs.TAG_NAME }}
draft: true # So we can manually edit before publishing
prerelease: false

0 comments on commit fea5b4d

Please sign in to comment.