diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43903fa7..ebcd9708 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,7 +58,7 @@ jobs: version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/v\(.*\)$/\1/') echo "VERSION=${version}" >> $GITHUB_OUTPUT - - name: Validate version format + - name: Validate extracted version format run: | version=${{ steps.extract_version.outputs.VERSION }} if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then @@ -69,18 +69,15 @@ jobs: - name: Update the version & CHANGELOG for all the packages run: dart ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }} - - name: Checkout to the master branch - run: git checkout master - - name: Commit the changes of the updated version & CHANGELOG for all the packages id: auto-commit-action uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}" - - name: Run if changes have been detected + - name: Check if changes have been done if: steps.auto-commit-action.outputs.changes_detected == 'true' - run: echo "The changes of the previous step has been done." + run: echo "The changes of the previous step have been done" - name: Check if package is ready for publishing run: flutter pub publish --dry-run