Skip to content

Commit 60835ca

Browse files
committed
[release] .github/workflows: update to use env file instead of set-env
Set-env is deprecated. Needs to be cherry-picked to the release branch too. Updates #962 Change-Id: Ic27238ce3f982abad3e4b6a14f7c2fb7eb75341f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272828 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> (cherry picked from commit f6c5b08) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272792 Reviewed-by: Robert Findley <[email protected]>
1 parent 99f2a10 commit 60835ca

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ jobs:
5050
exit 1
5151
fi
5252
53-
echo ::set-env name=EXT_VERSION::"${TAGGED_VERSION}"
53+
echo "EXT_VERSION=${TAGGED_VERSION}" >> $GITHUB_ENV
5454
WRITTEN_VERSION="$(cat package.json | jq '.version' -r)"
5555
56-
if [[ ${TAGGED_VERSION} == *"-"* ]]; then
57-
echo ::set-env name=EXT_ISPREVIEW::1
56+
if [[ "${TAGGED_VERSION}" == *"-"* ]]; then
57+
if [[ ! "${TAGGED_VERSION}" == "${WRITTEN_VERSION}"-rc.* ]]; then
58+
echo "Prerelease Tag and Version in package.json are not compatible: '${TAGGED_VERSION}' vs '${WRITTEN_VERSION}'"
59+
exit 1
60+
fi
61+
echo "EXT_ISPREVIEW=1" >> $GITHUB_ENV
5862
else
5963
if [[ "${TAGGED_VERSION}" != "${WRITTEN_VERSION}" ]]; then
6064
echo "Release Tag and Version in package.json do not match: '${TAGGED_VERSION}' vs '${WRITTEN_VERSION}'"
6165
exit 1
6266
fi
63-
echo ::set-env name=EXT_ISPREVIEW::0
67+
echo "EXT_ISPREVIEW=0" >> $GITHUB_ENV
6468
fi
6569
6670
- name: stamp version

0 commit comments

Comments
 (0)