Skip to content

test(Release): test #27

test(Release): test

test(Release): test #27

Workflow file for this run

name: Release test
on:
push:
branches:
- release-test
jobs:
release:
runs-on: ubuntu-latest
steps:
# 1. Checkout the branch (release-test)
- name: Checkout current branch (release-test)
uses: actions/checkout@v2
with:
ref: release-test
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# 2. Bump version using Lerna
- name: Bump version with Lerna
run: npx lerna version --conventional-commits --no-changelog --yes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 3. Push the version bump commit to the release-test branch
- name: Push version bump commit to remote
run: |
git push origin release-test
# 4. Pull the latest changes from remote
- name: Pull latest changes from remote
run: git pull origin release-test
# 5. Check for changes between release-test and main
- name: Check for changes between release-test and main
run: |
git fetch origin main
if [ "$(git rev-list --count release-test..origin/main)" -eq 0 ]; then
echo "No changes to merge. Skipping PR creation."
exit 0
fi
# 6. Create merge-back PR to main
- name: Create merge-back PR to main
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Release - version update"
branch: release-test
base: main
title: 'Release - version update'
body: 'This is an automated PR to merge the release branch into main after version bump and publish.'