diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc21ff6..873cbf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,19 +27,16 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: - ref: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.tag || github.ref }} + ref: ${{ inputs.tag || github.ref }} - name: Validate plugin metadata shell: bash + env: + RELEASE_TAG: ${{ inputs.tag || github.ref_name }} run: | set -euo pipefail - tag="${GITHUB_REF_NAME}" - if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then - tag="${{ inputs.tag }}" - elif [[ "${GITHUB_EVENT_NAME}" == "workflow_call" ]]; then - tag="${{ inputs.tag }}" - fi + tag="${RELEASE_TAG}" if [[ ! "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then echo "Release tags must use internal SemVer format, for example v0.1.0: $tag" >&2