Skip to content

Commit 0cd4000

Browse files
authored
Replace deprecated set-output commands (#6939)
1 parent a405663 commit 0cd4000

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.github/workflows/merge-release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
export VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
2020
export VERSION=`node -e "${VERSION_SCRIPT}"`
21-
echo "::set-output name=RELEASE_VERSION::$VERSION"
21+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
2222
- name: Echo version in shell
2323
run: |
2424
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"

.github/workflows/release-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
9797
VERSION=`node -e "${VERSION_SCRIPT}"`
98-
echo "::set-output name=BASE_VERSION::$VERSION"
98+
echo "BASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
9999
- name: Echo version in shell
100100
run: |
101101
echo "Base version: ${{ steps.get-version.outputs.BASE_VERSION }}"

.github/workflows/release-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
run: |
115115
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
116116
VERSION=`node -e "${VERSION_SCRIPT}"`
117-
echo "::set-output name=STAGING_VERSION::$VERSION"
117+
echo "STAGING_VERSION=$VERSION" >> $GITHUB_OUTPUT
118118
BASE_VERSION=$(echo $VERSION | cut -d "-" -f 1)
119-
echo "::set-output name=BASE_VERSION::$BASE_VERSION"
119+
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_OUTPUT
120120
- name: Echo versions in shell
121121
run: |
122122
echo "Staging release ${{ steps.get-version.outputs.STAGING_VERSION }}"

scripts/ci/check_changeset.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ async function main() {
124124
const errors = [];
125125
try {
126126
await exec(`yarn changeset status`);
127-
console.log(`::set-output name=BLOCKING_FAILURE::false`);
127+
console.log(`"BLOCKING_FAILURE=false" >> $GITHUB_STATE`);
128128
} catch (e) {
129129
const error = e as Error;
130130
if (error.message.match('No changesets present')) {
131-
console.log(`::set-output name=BLOCKING_FAILURE::false`);
131+
console.log(`"BLOCKING_FAILURE=false" >> $GITHUB_STATE`);
132132
} else {
133133
const messageLines = error.message.replace(/🦋 error /g, '').split('\n');
134134
let formattedStatusError =
@@ -149,7 +149,7 @@ async function main() {
149149
* step. See:
150150
* https://github.com/actions/toolkit/blob/master/docs/commands.md#set-outputs
151151
*/
152-
console.log(`::set-output name=BLOCKING_FAILURE::true`);
152+
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
153153
}
154154
}
155155

@@ -185,13 +185,13 @@ async function main() {
185185
`- Package ${bumpPackage} has a ${bumpText} bump which requires an ` +
186186
`additional line to bump the main "firebase" package to ${bumpText}.`
187187
);
188-
console.log(`::set-output name=BLOCKING_FAILURE::true`);
188+
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
189189
} else if (bumpRank[changesetPackages['firebase']] < highestBump) {
190190
errors.push(
191191
`- Package ${bumpPackage} has a ${bumpText} bump. ` +
192192
`Increase the bump for the main "firebase" package to ${bumpText}.`
193193
);
194-
console.log(`::set-output name=BLOCKING_FAILURE::true`);
194+
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
195195
}
196196
}
197197
}
@@ -207,7 +207,7 @@ async function main() {
207207
*/
208208
if (errors.length > 0)
209209
console.log(
210-
`::set-output name=CHANGESET_ERROR_MESSAGE::${errors.join('%0A')}`
210+
`"CHANGESET_ERROR_MESSAGE=${errors.join('%0A')}" >> $GITHUB_STATE`
211211
);
212212
process.exit();
213213
}

scripts/ci/detect-doc-changes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ async function runInCI() {
8383
}
8484

8585
if (await docChanged(mergeBaseSha, headSha)) {
86-
console.log(`::set-output name=DOC_CHANGED::true`);
86+
console.log(`"DOC_CHANGED=true" >> $GITHUB_STATE`);
8787
} else {
88-
console.log(`::set-output name=DOC_CHANGED::false`);
88+
console.log(`"DOC_CHANGED=false" >> $GITHUB_STATE`);
8989
}
9090
}
9191

0 commit comments

Comments
 (0)