Skip to content

Commit 991e4cd

Browse files
danezkodiakhq[bot]
andauthored
chore: migrate from deprecated set-output command (#4775)
Also changes the codecov label for nodejs to be "<node-major-version>" (right now "14" and "18") instead of "*" Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 4883383 commit 991e4cd

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.github/workflows/pre-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
package=${package_tag%/*}
2727
tag=${package_tag#*/}
2828
version=${info##*/}
29-
echo "::set-output name=package::${package}"
30-
echo "::set-output name=tag::${tag}"
31-
echo "::set-output name=version::${version}"
29+
echo "package=${package}" >> $GITHUB_OUTPUT
30+
echo "tag=${tag}" >> $GITHUB_OUTPUT
31+
echo "version=${version}" >> $GITHUB_OUTPUT
3232
- name: Log extracted information
3333
run: |-
3434
echo package=${{ steps.extract.outputs.package }}

.github/workflows/workflow.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
# Sets an output parameter if this is a release PR
2222
- name: Check for release
2323
id: release-check
24-
run: echo "::set-output name=IS_RELEASE::true"
24+
# For windows we have to use $env:
25+
run: |-
26+
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
27+
echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT
2528
if: ${{ startsWith(github.head_ref, 'release-') }}
2629
- uses: actions/checkout@v3
2730
with:
@@ -100,7 +103,10 @@ jobs:
100103
# Sets an output parameter if this is a release PR
101104
- name: Check for release
102105
id: release-check
103-
run: echo "::set-output name=IS_RELEASE::true"
106+
# For windows we have to use $env:
107+
run: |-
108+
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
109+
echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT
104110
if: ${{ startsWith(github.head_ref, 'release-') }}
105111
- name: Git checkout
106112
uses: actions/checkout@v3
@@ -137,11 +143,14 @@ jobs:
137143
- name: Get test coverage flags
138144
id: test-coverage-flags
139145
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
146+
# For windows we have to use $env:
140147
run: |-
141148
os=${{ matrix.os }}
142-
node=${{ matrix.node-version }}
143-
echo "::set-output name=os::${os/-latest/}"
144-
echo "::set-output name=node::node_${node//[.*]/}"
149+
node=$(node --version)
150+
echo "os=${os/-latest/}" >> $GITHUB_OUTPUT
151+
echo "os=${os/-latest/}" >> $env:GITHUB_OUTPUT
152+
echo "node=node_${node/.*.*/}" >> $GITHUB_OUTPUT
153+
echo "node=node_${node/.*.*/}" >> $env:GITHUB_OUTPUT
145154
shell: bash
146155
- uses: codecov/codecov-action@v3
147156
if: ${{ !steps.release-check.outputs.IS_RELEASE }}

0 commit comments

Comments
 (0)