test(Release): test #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release test | |
on: | |
push: | |
branches: | |
- release-test-v7 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout the branch (release-test-v7) | |
- name: Checkout current branch (release-test-v7) | |
uses: actions/checkout@v2 | |
with: | |
ref: release-test-v7 | |
- name: Configure Git | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Install modules | |
run: npm ci | |
- name: Build icons | |
run: npm run build:icons | |
# 2. Bump version using Lerna | |
- name: Bump version with Lerna | |
run: lerna version --conventional-commits --no-changelog --yes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# 3. Push the version bump commit to the release-test-v7 branch | |
# - name: Push version bump commit to remote | |
# run: | | |
# git push origin release-test-v7 | |
# 4. Pull the latest changes from remote | |
- name: Pull latest changes from remote | |
run: git pull origin release-test-v7 | |
# 5. Check for changes between release-test-v7 and main | |
- name: Check for changes between release-test-v7 and main | |
run: | | |
git fetch origin main | |
if [ "$(git rev-list --count release-test-v7..origin/main)" -eq 0 ]; then | |
echo "No changes to merge. Skipping PR creation." | |
exit 0 | |
fi | |
- name: Create merge-back PR to main using GitHub API | |
run: | | |
curl -X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{"title":"Release - version update","body":"This is an automated PR to merge the release branch into main after version bump and publish.","head":"release-test-v7","base":"main"}' \ | |
https://api.github.com/repos/${{ github.repository }}/pulls | |
# # 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-v7 | |
# base: main | |
# title: 'Release - version update' | |
# body: 'This is an automated PR to merge the release branch into main after version bump and publish.' | |