From 32f3b0aa7a0f780d13ddf3743e165851967209d4 Mon Sep 17 00:00:00 2001 From: Daniel Lovell Date: Sun, 29 Sep 2024 23:30:36 -0700 Subject: [PATCH] Cannot have tags with same name as branches --- .github/workflows/release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 242821c..7f00fc2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,14 +18,19 @@ jobs: ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: 0 lfs: false + - name: Get latest tag + id: get_latest_tag + run: | + latest_tag=$(git describe --tags --abbrev=0) + echo "LATEST_TAG=${latest_tag}" >> $GITHUB_OUTPUT - name: Create release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.event.workflow_run.head_branch }} - release_name: ${{ github.event.workflow_run.head_branch }} + tag_name: release_${{ steps.get_latest_tag.outputs.LATEST_TAG }} + release_name: Release ${{ steps.get_latest_tag.outputs.LATEST_TAG }} body_path: RELEASE.md draft: false prerelease: false