From 9b6070eab41f7520d3ff4f81cbe849e9f7fcf5ee Mon Sep 17 00:00:00 2001 From: "Sumant.xD" <65810424+SumantxD@users.noreply.github.com> Date: Tue, 30 May 2023 09:40:37 -0500 Subject: [PATCH 1/3] Update lighthouse-ci.yml resolved set-output command depreciation --- .github/workflows/lighthouse-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 137d2fb77e8e..f8cc63d308df 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -32,7 +32,7 @@ jobs: ) id: should_run name: Should Run - run: echo "::set-output name=shouldrun::true" + run: echo "shouldrun=true" >> $GITHUB_OUTPUT - if: steps.should_run.outputs.shouldrun == 'true' uses: actions/checkout@v3 From fa3865e5b0c03169f20ad44f6b88b29f4bf339eb Mon Sep 17 00:00:00 2001 From: "Sumant.xD" <65810424+SumantxD@users.noreply.github.com> Date: Tue, 30 May 2023 10:15:43 -0500 Subject: [PATCH 2/3] Update automated-releases.md updated the blog section --- pages/blog/automated-releases.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pages/blog/automated-releases.md b/pages/blog/automated-releases.md index 62c9d7fb82dc..c5d3821c34bb 100644 --- a/pages/blog/automated-releases.md +++ b/pages/blog/automated-releases.md @@ -194,7 +194,9 @@ To share the output, you must assign an `id` to the step and declare a variable ```yaml - name: Get version from package.json after release step id: extractver - run: echo "::set-output name=version::$(npm run get-version --silent)" + run: | + npm run get-version --silent + echo "version=$(npm run get-version --silent)" >> $GITHUB_ENV ``` You can access the shared value by the `id` and a variable name like `steps.extractver.outputs.version`. We use it, for example, in the condition that specifies if further steps of the workflow should be triggered or not. If the version in `package.json` changed after GitHub and NPM step, this means we should proceed with Docker publishing and pull request creation: @@ -228,9 +230,14 @@ jobs: node-version: 13 - name: Install dependencies run: npm ci + - name: Get version from package.json before release step id: initversion - run: echo "::set-output name=version::$(npm run get-version --silent)" + run: npm run get-version --silent + + - name: Set output + run: echo "version=$(npm run get-version --silent)" >> $GITHUB_OUTPUT + - name: Release to NPM and GitHub id: release env: From a692b3e7116eb7fbead69aa3601a32f5697cd8db Mon Sep 17 00:00:00 2001 From: "Sumant.xD" <65810424+SumantxD@users.noreply.github.com> Date: Tue, 30 May 2023 12:38:18 -0500 Subject: [PATCH 3/3] Update automated-releases.md removed redundancy and fixed _ENV to _OUTPUT --- pages/blog/automated-releases.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/blog/automated-releases.md b/pages/blog/automated-releases.md index c5d3821c34bb..a23adb9fffe4 100644 --- a/pages/blog/automated-releases.md +++ b/pages/blog/automated-releases.md @@ -195,8 +195,8 @@ To share the output, you must assign an `id` to the step and declare a variable - name: Get version from package.json after release step id: extractver run: | - npm run get-version --silent - echo "version=$(npm run get-version --silent)" >> $GITHUB_ENV + version=$(npm run get-version --silent) + echo "version=$version" >> $GITHUB_OUTPUT ``` You can access the shared value by the `id` and a variable name like `steps.extractver.outputs.version`. We use it, for example, in the condition that specifies if further steps of the workflow should be triggered or not. If the version in `package.json` changed after GitHub and NPM step, this means we should proceed with Docker publishing and pull request creation: