From 6230ec59ddd6cdddcfb17304e9a2a0ee1d6e6672 Mon Sep 17 00:00:00 2001 From: ilya-fedin Date: Thu, 24 Dec 2020 12:17:03 +0400 Subject: [PATCH] Replace deprecated set-env and add-path usage in actions (#126) --- .github/workflows/appimage.yml | 12 ++++++------ .github/workflows/mac-packaged.yml | 12 ++++++------ .github/workflows/snap-release.yml | 2 +- .github/workflows/tarball-release.yml | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 1d5864ae2..f810e35d3 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -79,7 +79,7 @@ jobs: steps: - name: Get repository name. - run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/} + run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Disable man for further package installs. run: | @@ -137,11 +137,11 @@ jobs: echo `md5sum $thisFile | cut -c -32` >> CACHE_KEY.txt fi md5cache=$(md5sum CACHE_KEY.txt | cut -c -32) - echo ::set-env name=CACHE_KEY::$md5cache + echo "CACHE_KEY=$md5cache" >> $GITHUB_ENV mkdir -p Libraries cd Libraries - echo ::set-env name=LibrariesPath::`pwd` + echo "LibrariesPath=`pwd`" >> $GITHUB_ENV - name: Patches. run: | @@ -590,9 +590,9 @@ jobs: if [ -n "${{ matrix.defines }}" ]; then DEFINE="-D ${{ matrix.defines }}=ON" echo Define from matrix: $DEFINE - echo ::set-env name=ARTIFACT_NAME::Kotatogram_${{ matrix.defines }} + echo "ARTIFACT_NAME=Kotatogram_${{ matrix.defines }}" >> $GITHUB_ENV else - echo ::set-env name=ARTIFACT_NAME::Kotatogram + echo "ARTIFACT_NAME=Kotatogram" >> $GITHUB_ENV fi ./configure.sh \ @@ -619,7 +619,7 @@ jobs: -extra-plugins=bearer,iconengines,imageformats,platforminputcontexts,platforms/libqwayland-egl.so,platforms/libqwayland-generic.so,platformthemes/libqgtk3.so,platformthemes/libqxdgdesktopportal.so,styles/libkvantum.so,wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration appimage_name=$(echo Kotatogram_Desktop*.AppImage) - echo ::set-env name=APPIMAGE_NAME::$appimage_name + echo "APPIMAGE_NAME=$appimage_name" >> $GITHUB_ENV # We don't need AppImageLauncher's desktop integration due to bad UX dd if=/dev/zero of=$appimage_name bs=1 count=3 seek=8 conv=notrunc diff --git a/.github/workflows/mac-packaged.yml b/.github/workflows/mac-packaged.yml index 8013a837d..dcf9e9f41 100644 --- a/.github/workflows/mac-packaged.yml +++ b/.github/workflows/mac-packaged.yml @@ -70,7 +70,7 @@ jobs: steps: - name: Get repository name. - run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/} + run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Clone. uses: actions/checkout@v2 @@ -90,13 +90,13 @@ jobs: thisFile=$REPO_NAME/.github/workflows/mac-packaged.yml echo `md5 -q $thisFile` >> CACHE_KEY.txt fi - echo ::set-env name=CACHE_KEY::`md5 -q CACHE_KEY.txt` + echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV - echo ::add-path::/usr/local/opt/qt/bin + echo /usr/local/opt/qt/bin >> $GITHUB_PATH mkdir -p Libraries/macos cd Libraries/macos - echo ::set-env name=LibrariesPath::`pwd` + echo "LibrariesPath=`pwd`" >> $GITHUB_ENV - name: FFmpeg cache. id: cache-ffmpeg @@ -259,9 +259,9 @@ jobs: if [ -n "${{ matrix.defines }}" ]; then DEFINE="-D ${{ matrix.defines }}=ON" echo Define from matrix: $DEFINE - echo ::set-env name=ARTIFACT_NAME::Kotatogram_${{ matrix.defines }} + echo "ARTIFACT_NAME=Kotatogram_${{ matrix.defines }}" >> $GITHUB_ENV else - echo ::set-env name=ARTIFACT_NAME::Kotatogram + echo "ARTIFACT_NAME=Kotatogram" >> $GITHUB_ENV fi ./configure.sh \ diff --git a/.github/workflows/snap-release.yml b/.github/workflows/snap-release.yml index a01697923..486215a71 100644 --- a/.github/workflows/snap-release.yml +++ b/.github/workflows/snap-release.yml @@ -39,7 +39,7 @@ jobs: - name: Get artifact name run: | artifact_name=$(echo kotatogram-desktop_*.snap) - echo ::set-env name=ARTIFACT_NAME::$artifact_name + echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV - name: Upload Release Asset id: upload-release-asset diff --git a/.github/workflows/tarball-release.yml b/.github/workflows/tarball-release.yml index 36a7868cd..9ee679327 100644 --- a/.github/workflows/tarball-release.yml +++ b/.github/workflows/tarball-release.yml @@ -15,7 +15,7 @@ jobs: run: | tag_name=${GITHUB_REF##*/} version=${tag_name#k} - echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}-$version-full + echo "REPO_NAME=${GITHUB_REPOSITORY##*/}-$version-full" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v2 @@ -26,7 +26,7 @@ jobs: - name: Create tarball run: | artifact_name="$REPO_NAME.tar.gz" - echo ::set-env name=ARTIFACT_NAME::$artifact_name + echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV rm -rf $REPO_NAME/.git tar -caf $artifact_name $REPO_NAME