Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
arunsathiya committed Jan 20, 2024
1 parent 9fbf1a9 commit 694781f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand Down

0 comments on commit 694781f

Please sign in to comment.