From d5ee1c3f26fadfe632789180f70d6b3c48557a5b Mon Sep 17 00:00:00 2001 From: rsora Date: Wed, 8 Apr 2020 11:48:23 +0200 Subject: [PATCH 1/3] Replace $PWD with github actions workspace variable to solve invalid chars issue in container volume binding --- .github/workflows/nightly.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 09d9f133101..f4befcb56ae 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -13,7 +13,7 @@ jobs: image: arduino/arduino-cli:builder-1 volumes: # cache go dependencies across pipeline's steps - - $PWD/go:/go + - ${{ github.workspace }}/go:/go steps: - name: checkout diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4be902cf688..e8b860e9069 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ jobs: image: arduino/arduino-cli:builder-1 volumes: # cache go dependencies across pipeline's steps - - $PWD/go:/go + - ${{ github.workspace }}/go:/go steps: - name: Checkout @@ -70,7 +70,7 @@ jobs: gon gon.config.hcl # GitHub's upload/download-artifact@v1 actions don't preserve file permissions, # so we need to add execution permission back until @v2 actions are released. - chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli + chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \ -C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \ -C ../../ LICENSE.txt From fd9f6b2fff3b5e57211ab371d13e784cebe035d4 Mon Sep 17 00:00:00 2001 From: rsora Date: Wed, 8 Apr 2020 15:31:29 +0200 Subject: [PATCH 2/3] Remove Tag step adding tag parse directly in notarization step --- .github/workflows/release.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e8b860e9069..d1adad8ea7c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,10 +42,6 @@ jobs: with: name: dist - - name: Get the current release tag - id: get_tag - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Download Gon run: | wget -q https://github.com/mitchellh/gon/releases/download/v0.2.2/gon_0.2.2_macos.zip @@ -54,7 +50,6 @@ jobs: - name: Notarize binary, re-package it and update checksum env: - TAG: ${{ steps.get_tag.outputs.VERSION }} AC_USERNAME: ${{ secrets.AC_USERNAME }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }} # This step performs the following: @@ -71,6 +66,7 @@ jobs: # GitHub's upload/download-artifact@v1 actions don't preserve file permissions, # so we need to add execution permission back until @v2 actions are released. chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli + TAG=${GITHUB_REF/refs\/tags\//} tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \ -C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \ -C ../../ LICENSE.txt From c4ac8b5c823215d9aaa40e44d2c4d10f2ccdf676 Mon Sep 17 00:00:00 2001 From: rsora Date: Wed, 8 Apr 2020 15:49:52 +0200 Subject: [PATCH 3/3] Add semver tool to enable pre-release flag in release creation --- .github/workflows/release.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d1adad8ea7c..b0c712bc99f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -102,6 +102,15 @@ jobs: echo $body echo "::set-output name=BODY::$body" + - name: Identify Prerelease + # This is a workaround while waiting for create-release action + # to implement auto pre-release based on tag + id: prerelease + run: | + wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip + unzip -p /tmp/3.0.0.zip semver-tool-3.0.0/src/semver >/tmp/semver && chmod +x /tmp/semver + if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi + - name: Create Github Release id: create_release uses: actions/create-release@master @@ -112,7 +121,7 @@ jobs: release_name: ${{ github.ref }} body: ${{ steps.changelog.outputs.BODY }} draft: false - prerelease: false + prerelease: ${{ steps.prerelease.outputs.IS_PRE }} - name: Upload release files on Github uses: svenstaro/upload-release-action@v1-release