diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 527a2e4..fb120c4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,7 +46,7 @@ jobs: if: ${{ inputs.should_pack == true }} run: | VERSION=$(node -pe 'require("./package.json").version') - echo "::set-output name=version::$VERSION" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Upload build result if: ${{ inputs.should_pack == true }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a79333..410afa8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,15 +20,18 @@ jobs: id: check_version run: | NEW_PACKAGE_VERSION=$(node -pe 'require("./package.json").version') + echo "$NEW_PACKAGE_VERSION" latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) git checkout $latestTag OLD_PACKAGE_VERSION=$(node -pe 'require("./package.json").version') + echo "$OLD_PACKAGE_VERSION" if [ $NEW_PACKAGE_VERSION != $OLD_PACKAGE_VERSION ]; then - echo "::set-output name=version::$NEW_PACKAGE_VERSION" + echo "Version was changed" + echo "version=xxxx" >> $GITHUB_OUTPUT fi build: @@ -41,7 +44,7 @@ jobs: publish: runs-on: ubuntu-latest - needs: [build] + needs: [build, ensure_version_changed] if: ${{ needs.ensure_version_changed.outputs.version }} name: Publish to npm steps: