Skip to content

Commit fa409dd

Browse files
committed
add workaround step to check semver and trigger prerelease
just like the arduino-cli does
1 parent c5e43ba commit fa409dd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ jobs:
334334
- name: Download artifact
335335
uses: actions/download-artifact@v2 # download all the artifacts
336336

337+
- name: Identify Prerelease
338+
# This is a workaround while waiting for create-release action to implement auto pre-release based on tag
339+
id: prerelease
340+
run: |
341+
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.1.0.zip
342+
unzip -p /tmp/3.1.0.zip semver-tool-3.1.0/src/semver >/tmp/semver && chmod +x /tmp/semver
343+
if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi
344+
337345
# mandatory step because upload-release-action does not support multiple folders
338346
- name: prepare artifacts for the release
339347
run: |
@@ -352,7 +360,7 @@ jobs:
352360
release_name: ${{ github.ref }}
353361
body: "THIS IS A TEST RELEASE"
354362
draft: false
355-
prerelease: true # see later how to handle this (maybe just a check on "-dev" will be sufficient)
363+
prerelease: ${{ steps.prerelease.outputs.IS_PRE }}
356364

357365
- name: Upload release files on Github
358366
uses: svenstaro/upload-release-action@v2

0 commit comments

Comments
 (0)