From 694781fbbb820072bdcdac3767f8a78a3ceaded4 Mon Sep 17 00:00:00 2001 From: Arun Sathiya Date: Fri, 19 Jan 2024 23:57:42 -0800 Subject: [PATCH] ci: Use GITHUB_OUTPUT envvar instead of set-output command `save-state` and `set-output` commands used in GitHub Actions are deprecated and [GitHub recommends using environment files](https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/). This PR updates the usage of `::set-output` to `"$GITHUB_OUTPUT"` Instructions for envvar usage from GitHub docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter --- .github/workflows/publish-extension.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 4343d08..4cbcffd 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -41,7 +41,7 @@ jobs: - name: Setup package path id: setup - run: echo "::set-output name=packageName::$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '.vsix')")" + run: echo "packageName=$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '.vsix')")" >> "$GITHUB_OUTPUT" - name: Package run: | @@ -58,8 +58,8 @@ jobs: run: | $version = (Get-Content ./package.json -Raw | ConvertFrom-Json).version Write-Host "tag: v$version" - Write-Host "::set-output name=tag::v$version" - Write-Host "::set-output name=version::$version" + Write-Host "tag=v$version" >> "$GITHUB_OUTPUT" + Write-Host "version=$version" >> "$GITHUB_OUTPUT" shell: pwsh publishMS: