Skip to content

Commit 94476a6

Browse files
committed
Accept tag with or without v prefix in wporg deploy
1 parent 2dd7f1c commit 94476a6

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release-wporg.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,18 @@ jobs:
3333
sparse-checkout: bin/
3434
sparse-checkout-cone-mode: false
3535

36+
- name: Resolve tag
37+
id: resolve
38+
run: |
39+
TAG="${{ inputs.tag }}"
40+
# Ensure the tag has a "v" prefix.
41+
[[ "$TAG" == v* ]] || TAG="v$TAG"
42+
echo "tag=$TAG" >> $GITHUB_OUTPUT
43+
3644
- name: Download plugin zip from release
3745
env:
3846
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
TAG: ${{ inputs.tag }}
47+
TAG: ${{ steps.resolve.outputs.tag }}
4048
run: |
4149
gh release download "$TAG" \
4250
--repo "${{ github.repository }}" \
@@ -46,7 +54,7 @@ jobs:
4654
4755
- name: Verify release metadata
4856
env:
49-
TAG: ${{ inputs.tag }}
57+
TAG: ${{ steps.resolve.outputs.tag }}
5058
run: |
5159
VERSION="${TAG#v}"
5260
bash bin/verify-release-metadata.sh plugin-sqlite-database-integration "$VERSION"

0 commit comments

Comments
 (0)