1414 image : arduino/arduino-cli:builder-1
1515 volumes :
1616 # cache go dependencies across pipeline's steps
17- - $PWD /go:/go
17+ - ${{ github.workspace }} /go:/go
1818
1919 steps :
2020 - name : Checkout
4242 with :
4343 name : dist
4444
45- - name : Get the current release tag
46- id : get_tag
47- run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
48-
4945 - name : Download Gon
5046 run : |
5147 wget -q https://github.com/mitchellh/gon/releases/download/v0.2.2/gon_0.2.2_macos.zip
5450
5551 - name : Notarize binary, re-package it and update checksum
5652 env :
57- TAG : ${{ steps.get_tag.outputs.VERSION }}
5853 AC_USERNAME : ${{ secrets.AC_USERNAME }}
5954 AC_PASSWORD : ${{ secrets.AC_PASSWORD }}
6055 # This step performs the following:
7065 gon gon.config.hcl
7166 # GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
7267 # so we need to add execution permission back until @v2 actions are released.
73- chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
68+ chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
69+ TAG=${GITHUB_REF/refs\/tags\//}
7470 tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \
7571 -C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
7672 -C ../../ LICENSE.txt
@@ -106,6 +102,15 @@ jobs:
106102 echo $body
107103 echo "::set-output name=BODY::$body"
108104
105+ - name : Identify Prerelease
106+ # This is a workaround while waiting for create-release action
107+ # to implement auto pre-release based on tag
108+ id : prerelease
109+ run : |
110+ wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip
111+ unzip -p /tmp/3.0.0.zip semver-tool-3.0.0/src/semver >/tmp/semver && chmod +x /tmp/semver
112+ if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi
113+
109114 - name : Create Github Release
110115 id : create_release
111116 uses : actions/create-release@master
@@ -116,7 +121,7 @@ jobs:
116121 release_name : ${{ github.ref }}
117122 body : ${{ steps.changelog.outputs.BODY }}
118123 draft : false
119- prerelease : false
124+ prerelease : ${{ steps.prerelease.outputs.IS_PRE }}
120125
121126 - name : Upload release files on Github
122127 uses : svenstaro/upload-release-action@v1-release
0 commit comments