File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : ' The tag to publish'
11+ required : true
712
813jobs :
914 publish :
1015 name : Publish new version to TER
11- if : startsWith(github.ref, 'refs/tags/') && (github.repository == 'benjaminkott/bootstrap_package')
16+ if : ( startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch ') && (github.repository == 'benjaminkott/bootstrap_package')
1217 runs-on : ubuntu-latest
1318 env :
1419 TYPO3_EXTENSION_KEY : ${{ secrets.TYPO3_EXTENSION_KEY }}
@@ -17,19 +22,28 @@ jobs:
1722 steps :
1823 - name : Checkout repository
1924 uses : actions/checkout@v4
25+ with :
26+ ref : ${{ github.event.inputs.tag || github.ref }}
27+
28+ - name : Get version
29+ id : get-version
30+ run : |
31+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
32+ echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
33+ else
34+ echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
35+ fi
2036
2137 - name : Check tag
2238 run : |
23- if ! [[ ${{ github.ref }} =~ ^refs/tags/ [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
39+ if ! [[ ${{ steps.get-version.outputs.version }} =~ ^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
2440 exit 1
2541 fi
26- - name : Get version
27- id : get-version
28- run : echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
2942
3043 - name : Get comment
3144 id : get-comment
3245 run : |
46+ git fetch --tags
3347 readonly local comment=$(git tag -n10 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g")
3448 if [[ -z "${comment// }" ]]; then
3549 echo "comment=Released version ${{ steps.get-version.outputs.version }} of ${{ env.TYPO3_EXTENSION_KEY }}" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments