Skip to content

Commit

Permalink
Fixed version bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-bubu committed Mar 5, 2024
1 parent fb43fe6 commit c752a3b
Showing 1 changed file with 5 additions and 35 deletions.
40 changes: 5 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,51 +164,21 @@ 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 "[email protected]"
- name: Set version from tag
run: |
TAG=$(git describe --tags --abbrev=0)
VERSION=${TAG:1}
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/[email protected]"
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 ]
Expand Down

0 comments on commit c752a3b

Please sign in to comment.