Skip to content

Commit

Permalink
Replace deprecated set-output commands (#6939)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 authored Jan 13, 2023
1 parent a405663 commit 0cd4000
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: |
export VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
export VERSION=`node -e "${VERSION_SCRIPT}"`
echo "::set-output name=RELEASE_VERSION::$VERSION"
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Echo version in shell
run: |
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
run: |
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
VERSION=`node -e "${VERSION_SCRIPT}"`
echo "::set-output name=BASE_VERSION::$VERSION"
echo "BASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Echo version in shell
run: |
echo "Base version: ${{ steps.get-version.outputs.BASE_VERSION }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ jobs:
run: |
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
VERSION=`node -e "${VERSION_SCRIPT}"`
echo "::set-output name=STAGING_VERSION::$VERSION"
echo "STAGING_VERSION=$VERSION" >> $GITHUB_OUTPUT
BASE_VERSION=$(echo $VERSION | cut -d "-" -f 1)
echo "::set-output name=BASE_VERSION::$BASE_VERSION"
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_OUTPUT
- name: Echo versions in shell
run: |
echo "Staging release ${{ steps.get-version.outputs.STAGING_VERSION }}"
Expand Down
12 changes: 6 additions & 6 deletions scripts/ci/check_changeset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ async function main() {
const errors = [];
try {
await exec(`yarn changeset status`);
console.log(`::set-output name=BLOCKING_FAILURE::false`);
console.log(`"BLOCKING_FAILURE=false" >> $GITHUB_STATE`);
} catch (e) {
const error = e as Error;
if (error.message.match('No changesets present')) {
console.log(`::set-output name=BLOCKING_FAILURE::false`);
console.log(`"BLOCKING_FAILURE=false" >> $GITHUB_STATE`);
} else {
const messageLines = error.message.replace(/🦋 error /g, '').split('\n');
let formattedStatusError =
Expand All @@ -149,7 +149,7 @@ async function main() {
* step. See:
* https://github.com/actions/toolkit/blob/master/docs/commands.md#set-outputs
*/
console.log(`::set-output name=BLOCKING_FAILURE::true`);
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
}
}

Expand Down Expand Up @@ -185,13 +185,13 @@ async function main() {
`- Package ${bumpPackage} has a ${bumpText} bump which requires an ` +
`additional line to bump the main "firebase" package to ${bumpText}.`
);
console.log(`::set-output name=BLOCKING_FAILURE::true`);
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
} else if (bumpRank[changesetPackages['firebase']] < highestBump) {
errors.push(
`- Package ${bumpPackage} has a ${bumpText} bump. ` +
`Increase the bump for the main "firebase" package to ${bumpText}.`
);
console.log(`::set-output name=BLOCKING_FAILURE::true`);
console.log(`"BLOCKING_FAILURE=true" >> $GITHUB_STATE`);
}
}
}
Expand All @@ -207,7 +207,7 @@ async function main() {
*/
if (errors.length > 0)
console.log(
`::set-output name=CHANGESET_ERROR_MESSAGE::${errors.join('%0A')}`
`"CHANGESET_ERROR_MESSAGE=${errors.join('%0A')}" >> $GITHUB_STATE`
);
process.exit();
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/detect-doc-changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ async function runInCI() {
}

if (await docChanged(mergeBaseSha, headSha)) {
console.log(`::set-output name=DOC_CHANGED::true`);
console.log(`"DOC_CHANGED=true" >> $GITHUB_STATE`);
} else {
console.log(`::set-output name=DOC_CHANGED::false`);
console.log(`"DOC_CHANGED=false" >> $GITHUB_STATE`);
}
}

Expand Down

0 comments on commit 0cd4000

Please sign in to comment.