Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/sync-plugin-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Sync plugin.json version
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: 'Tag to sync plugin.json to (e.g. v1.2.0). Escape hatch when push-tag trigger did not fire — see workflow-plugin-aws#18.'
required: true
type: string
permissions:
contents: write
pull-requests: write
Expand All @@ -14,10 +20,17 @@ jobs:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate tag format
run: |
TAG="${{ inputs.tag || github.ref_name }}"
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then
echo "::error::Invalid tag format: $TAG (expected vN.N.N or vN.N.N-suffix)"
exit 1
Comment on lines +23 to +28
fi
- name: Compute target version from tag
id: ver
run: |
TAG="${GITHUB_REF_NAME}"
TAG="${{ inputs.tag || github.ref_name }}"
VERSION="${TAG#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
Expand Down
Loading