diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml index ff9f1e53..e0bf0afd 100644 --- a/.github/workflows/test-release.yaml +++ b/.github/workflows/test-release.yaml @@ -124,7 +124,7 @@ jobs: # status: draft # releaseName: ${{ env.VERSION_NAME }} - bump-verion: + bump-version: name: Bump version in pubspec.yaml runs-on: ubuntu-latest needs: [get-version] @@ -140,19 +140,18 @@ jobs: - run: flutter clean - run: flutter pub get - - name: Bump version in pubspec.yaml - run: dart run pub_version_plus:main build - - - name: Fetch latest branch + - name: Fetch latest branch and rebase run: | git fetch origin ${{ github.head_ref }} git rebase origin/${{ github.head_ref }} + - name: Bump version in pubspec.yaml + run: dart run pub_version_plus:main build + - name: Commit version bump run: | git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - git checkout ${{ github.head_ref }} git add pubspec.yaml git commit -m "Bump build version" git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ github.head_ref }}