From 23839f38b149db8715f21dbd38e6dde122817222 Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Fri, 25 Aug 2023 14:15:56 -0700 Subject: [PATCH] Remove deprecated output production syntax (#8) Remove deprecated output production syntax --- action.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/action.yml b/action.yml index dd11e1f..5edefcc 100644 --- a/action.yml +++ b/action.yml @@ -96,7 +96,7 @@ runs: id: find working-directory: ${{ inputs.path }} run: | - echo "::set-output name=tag::$(greatest-semver-tag)" + echo "tag=$(greatest-semver-tag)" >> "$GITHUB_OUTPUT" shell: bash - name: Set current version based on stripped tag id: cur @@ -107,11 +107,11 @@ runs: echo "Invalid override."; exit 1 fi fi - echo "::set-output name=ver::${{ inputs.override }}" + echo "ver=${{ inputs.override }}" >> "$GITHUB_OUTPUT" elif [[ "${{ steps.find.outputs.tag }}" = "" ]]; then - echo "::set-output name=ver::0.0.0" + echo "ver=0.0.0" >> "$GITHUB_OUTPUT" else - echo "::set-output name=ver::$(echo "${{ steps.find.outputs.tag }}" | sed 's/^[^0-9]*//')" + echo "ver=$(echo "${{ steps.find.outputs.tag }}" | sed 's/^[^0-9]*//')" >> "$GITHUB_OUTPUT" fi shell: bash - name: Determine the prefix and set it @@ -119,52 +119,52 @@ runs: run: > ver="${{ steps.cur.outputs.ver }}"; if [[ "${{ inputs.override }}" != "" ]]; then - echo "::set-output name=str::$(echo ${${{ inputs.override }}%"$ver"})" + echo "str=$(echo ${${{ inputs.override }}%"$ver"})" >> "$GITHUB_OUTPUT" elif [[ "${{ steps.find.outputs.tag }}" != "" ]]; then - echo "::set-output name=str::$(echo ${${{ steps.find.outputs.tag }}%"$ver"})" + echo "str=$(echo ${${{ steps.find.outputs.tag }}%"$ver"})" >> "$GITHUB_OUTPUT" fi shell: bash - name: Test if planned input is greater than current id: test run: > if [[ $(semver compare ${{ inputs.planned }} ${{ steps.cur.outputs.ver }}) -eq 1 ]]; then - echo "::set-output name=greater::true" + echo "greater=true" >> "$GITHUB_OUTPUT" else - echo "::set-output name=greater::false" + echo "greater=false" >> "$GITHUB_OUTPUT" fi shell: bash if: ${{ inputs.planned != '' }} - name: Produce increments id: incr run: | - echo "::set-output name=patch::$(semver bump patch ${{ steps.cur.outputs.ver }})" - echo "::set-output name=minor::$(semver bump minor ${{ steps.cur.outputs.ver }})" - echo "::set-output name=major::$(semver bump major ${{ steps.cur.outputs.ver }})" - echo "::set-output name=prerelease::$(semver bump prerel ${{ inputs.prerelease }} ${{ steps.cur.outputs.ver }})" - echo "::set-output name=release::$(semver bump release ${{ steps.cur.outputs.ver }})" + echo "patch=$(semver bump patch ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" + echo "minor=$(semver bump minor ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" + echo "major=$(semver bump major ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" + echo "prerelease=$(semver bump prerel ${{ inputs.prerelease }} ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" + echo "release=$(semver bump release ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" shell: bash - name: Produce build increment if a build string was given id: build run: | - echo "::set-output name=incr::$(semver bump build ${{ inputs.build }} ${{ steps.cur.outputs.ver }})" + echo "incr=$(semver bump build ${{ inputs.build }} ${{ steps.cur.outputs.ver }})" >> "$GITHUB_OUTPUT" shell: bash if: ${{ inputs.build != '' }} - name: Produce version bump (if requested) id: bump run: > if [[ "${{ inputs.bump }}" = "patch" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.patch }}" + echo "ver=${{ steps.incr.outputs.patch }}" >> "$GITHUB_OUTPUT" elif [[ "${{ inputs.bump }}" = "minor" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.minor }}" + echo "ver=${{ steps.incr.outputs.minor }}" >> "$GITHUB_OUTPUT" elif [[ "${{ inputs.bump }}" = "major" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.major }}" + echo "ver=${{ steps.incr.outputs.major }}" >> "$GITHUB_OUTPUT" elif [[ "${{ inputs.bump }}" = "release" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.release }}" + echo "ver=${{ steps.incr.outputs.release }}" >> "$GITHUB_OUTPUT" elif [[ "${{ inputs.bump }}" = "prerelease" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.prerelease }}" + echo "ver=${{ steps.incr.outputs.prerelease }}" >> "$GITHUB_OUTPUT" elif [[ "${{ inputs.bump }}" = "build" ]]; then if [[ "${{ inputs.build }}" != "" ]]; then - echo "::set-output name=ver::${{ steps.incr.outputs.next-build }}" + echo "ver=${{ steps.incr.outputs.next-build }}" >> "$GITHUB_OUTPUT" else echo "The build input must be set when requesting build bump"; fi