Skip to content

Commit 350665d

Browse files
chore(actions): fix yarn upgrade scripts (#24148)
`set-output` is deprecated and we can use lerna instead of `buildup`. Also, the scripts were failing on lerna commands due to a missing dependency `js-yaml`. I've added that as well. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 554d049 commit 350665d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/yarn-upgrade-v1main.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Locate Yarn cache
2828
id: yarn-cache
29-
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
3030

3131
- name: Restore Yarn cache
3232
uses: actions/cache@v3
@@ -39,17 +39,16 @@ jobs:
3939
run: yarn install --frozen-lockfile
4040
- name: Install Tools
4141
run: |-
42-
npm -g install lerna npm-check-updates@^9.0.0
42+
npm -g install lerna js-yaml npm-check-updates@^9.0.0
4343
- name: Build CLI
44-
run: cd packages/aws-cdk && ../../scripts/buildup
44+
run: lerna run build --scope aws-cdk --include-dependencies --stream
4545
- name: Build Integ Runner
46-
run: cd packages/@aws-cdk/integ-runner && ../../../scripts/buildup
46+
run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies --stream
4747
- name: List Mono-Repo Packages
4848
id: list-packages
4949
# These need to be ignored from the `ncu` runs!
5050
run: |-
51-
echo -n "::set-output name=list::"
52-
node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')"
51+
echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT
5352
- name: Run "ncu -u"
5453
# We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266
5554
# We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453

.github/workflows/yarn-upgrade.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ jobs:
3737
run: yarn install --frozen-lockfile
3838
- name: Install Tools
3939
run: |-
40-
npm -g install lerna npm-check-updates@^9.0.0
40+
npm -g install lerna js-yaml npm-check-updates@^9.0.0
4141
- name: Build Integ Runner
42-
run: cd packages/@aws-cdk/integ-runner && ../../../scripts/buildup
42+
run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies
4343
- name: List Mono-Repo Packages
4444
id: list-packages
4545
# These need to be ignored from the `ncu` runs!
4646
run: |-
47-
echo -n "::set-output name=list::"
4847
echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT
4948
- name: Run "ncu -u"
5049
# We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266

0 commit comments

Comments
 (0)