File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,13 +107,14 @@ jobs:
107107 - name : Get version
108108 id : version
109109 run : |
110- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
111- echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
112- elif [ "${{ github.event_name }}" = "workflow_call" ]; then
113- echo "version=${{ inputs.tag }}" >> $GITHUB_OUTPUT
114- elif [ "${{ github.event_name }}" = "release " ]; then
115- echo "version= ${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
110+ TAG= "${{ inputs.tag }}"
111+ if [ -z "$TAG" ]; then
112+ TAG= "${{ github.event.inputs.tag }}"
113+ fi
114+ if [ -z "$TAG " ]; then
115+ TAG=" ${{ github.event.release.tag_name }}"
116116 fi
117+ echo "version=$TAG" >> $GITHUB_OUTPUT
117118
118119 - name : Flatten artifacts
119120 run : |
@@ -126,15 +127,15 @@ jobs:
126127 sha256sum * > checksums.txt
127128
128129 - name : Upload Release Assets
129- if : github.event_name == 'release' || github.event_name == 'workflow_call '
130+ if : steps.version.outputs.version != ' '
130131 uses : softprops/action-gh-release@v2
131132 with :
132133 tag_name : ${{ steps.version.outputs.version }}
133134 files : release/*
134135 env :
135136 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136137
137- - name : Create Release
138+ - name : Create Release (manual)
138139 if : github.event_name == 'workflow_dispatch'
139140 uses : softprops/action-gh-release@v2
140141 with :
You can’t perform that action at this time.
0 commit comments