Skip to content

Commit

Permalink
Fix the create release - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
yorevs committed Dec 6, 2024
1 parent 9d69435 commit a03c052
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ run-name: Create Release

on:
workflow_dispatch:
inputs:
tag_name:
description: 'The tag name to release'
default: ''
required: false
type: string
push:
tags:
- "v?[0-9]+.[0-9]+.[0-9]+"
Expand All @@ -11,9 +17,9 @@ on:
- "v?[0-9]+.[0-9]+.[0-9]+rc[0-9]+"

env:
PACKAGE_NAME: "${vars.PACKAGE_NAME}"
OWNER: "${vars.OWNER}"
TAP_NAME: "${vars.TAP_NAME}"
PACKAGE_NAME: "${{ vars.PACKAGE_NAME }}"
OWNER: "${{ vars.OWNER }}"
TAP_NAME: "${{ vars.TAP_NAME }}"

permissions:
contents: write
Expand All @@ -30,14 +36,13 @@ jobs:
- name: Extract tag and Details
id: release
run: |
echo "GITHUB_REF: ${GITHUB_REF}"
echo "GITHUB_REF_TYPE: ${GITHUB_REF_TYPE}"
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
TAG_NAME="${{ inputs.tag_name }}"
if [[ -z "$TAG_NAME" && "${GITHUB_REF_TYPE}" == "tag" ]]; then
TAG_NAME="${GITHUB_REF#refs/tags/}"
else
TAG_NAME="$(git tag | tail -n 1)"
if [[ -z "${TAG_NAME}" ]]; then
echo "No tags found: ${TAG_NAME}"
if [[ -z "$TAG_NAME" ]]; then
echo "No tags found!"
git tag
exit 1
fi
fi
Expand Down

0 comments on commit a03c052

Please sign in to comment.