Merge pull request #692 from thecodacus/versioning-workflow

chore: Versioning workflow
This commit is contained in:
Anirban Kar 2024-12-13 15:30:14 +05:30 committed by GitHub
commit 212ab4a020
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -15,7 +15,10 @@ jobs:
pull-requests: read pull-requests: read
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git - name: Configure Git
run: | run: |
@ -158,22 +161,23 @@ jobs:
- name: Commit Version Update - name: Commit Version Update
run: | run: |
git add package.json pnpm-lock.yaml git pull
git add package.json pnpm-lock.yaml changelog.md
git commit -m "chore: bump version to ${{ steps.bump_version.outputs.new_version }}" git commit -m "chore: bump version to ${{ steps.bump_version.outputs.new_version }}"
git push main git push
- name: Update Stable Branch - name: Update Stable Branch
run: | run: |
# Ensure stable branch exists # Ensure stable branch exists
git checkout stable 2>/dev/null || git checkout -b stable git checkout stable 2>/dev/null || git checkout -b stable
git merge main --no-ff -m "chore: merge main into stable for version ${{ steps.bump_version.outputs.new_version }}" git merge main --no-ff -m "chore: merge main into stable for version ${{ steps.bump_version.outputs.new_version }}"
git push stable git push --set-upstream origin stable
- name: Create and Push Tag - name: Create and Push Tag
run: | run: |
VERSION="v${{ steps.bump_version.outputs.new_version }}" VERSION="v${{ steps.bump_version.outputs.new_version }}"
git tag -a "$VERSION" -m "Release $VERSION" git tag -a "$VERSION" -m "Release $VERSION"
git push "$VERSION" git push origin "$VERSION"
# - name: Create GitHub Release # - name: Create GitHub Release
# env: # env:

View File

@ -1 +1 @@
{ "commit": "cbad04f035f017a4797768c75e180f10920c0e17" } { "commit": "3f706702b2486e72efe1602e710ccef6c387c82a" }