From c752a3bd4253e930881b43b6874fc00806dbde71 Mon Sep 17 00:00:00 2001 From: herr-bubu Date: Tue, 5 Mar 2024 17:02:14 +0100 Subject: [PATCH] Fixed version bumping --- .github/workflows/ci.yml | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f23d03299..c6add8e58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,8 +164,8 @@ jobs: run: npm i -g semver - name: Configure Git run: | - git config --global user.name "$(git log -1 --pretty=format:'%an')" - git config --global user.email "$(git log -1 --pretty=format:'%ae')" + git config --global user.name "galachain-release-bot" + git config --global user.email "galachain-release-bot@users.noreply.github.com" - name: Set version from tag run: | TAG=$(git describe --tags --abbrev=0) @@ -173,42 +173,12 @@ jobs: echo "TAG: $TAG" echo "VERSION: $VERSION" echo "NEW_SDK_VERSION=$VERSION" >> $GITHUB_ENV - - name: Create a new branch for version bump - run: | - git checkout -b version-bump-${{ env.NEW_SDK_VERSION }} - - name: Bump version and commit - run: | ./unifyVersions.js ${{ env.NEW_SDK_VERSION }} - npm ci npm i git add . - git commit -m "Bump version to ${{ env.NEW_SDK_VERSION }}" - - name: Push Changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: version-bump-${{ env.NEW_SDK_VERSION }} - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - commit-message: "Bump version to ${{ env.NEW_SDK_VERSION }}" - branch: version-bump-"${{ env.NEW_SDK_VERSION }}" - delete-branch: true - body: "Version bump to ${{ env.NEW_SDK_VERSION }}" - labels: version-bump - token: ${{ secrets.GITHUB_TOKEN }} - auto-merge: - needs: [ bump-version ] - name: Auto merge - runs-on: ubuntu-22.04 - if: github.event.pull_request.user.login == 'gala-user[bot]' - steps: - - id: automerge - name: automerge - uses: "pascalgn/automerge-action@v0.16.2" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MERGE_METHOD: squash + git commit -a -m "Bump version to ${{ env.NEW_SDK_VERSION }}" + git tag -a "$TAG" -m "Release $TAG" + git push origin "$TAG publish: name: Publish Release needs: [ auto-merge ]