File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 82
82
if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
83
83
env :
84
84
WINDOWS_CODESIGN_PASSWORD : ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
85
- run : | # Note: MSI_VERSION requires . as a separator, so replace "-" in the tag with ".".
85
+ run : | # Note: MSI_VERSION requires . as a separator and admits only numbers , so replace "-[a-z]* " in the tag with ".".
86
86
VERSION=${GITHUB_REF#refs/tags/v}
87
- MSI_VERSION=${VERSION//-/.}
87
+ MSI_VERSION=${VERSION//-[a-z]*. /.}
88
88
make dist VERSION=$VERSION MSI_VERSION=$MSI_VERSION
89
89
echo "VERSION=${VERSION}" >> $GITHUB_ENV
90
90
shell : bash
@@ -181,6 +181,12 @@ jobs:
181
181
ls dist
182
182
tag="${GITHUB_REF#refs/tags/}"
183
183
./.github/workflows/release_notes.sh ${tag} > release-notes.txt
184
- gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/} ./dist/*
184
+ if [[ $VERSION =~ -[a-z]+\. ]]; then
185
+ # If it is a pre-release (e.g. it contains `-pre.`) create release notes without artifacts.
186
+ gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/}
187
+ else
188
+ # Otherwise upload artifacts.
189
+ gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/} ./dist/*
190
+ fi
185
191
env :
186
192
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments