From 36800ff9e27e89985af0df7c7dabe1138521c1e0 Mon Sep 17 00:00:00 2001 From: Tiago Vaz Date: Tue, 14 Oct 2025 10:32:32 -0300 Subject: [PATCH 1/4] ci: push new branch before run version bump --- .github/workflows/minor-release-latest.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/minor-release-latest.yml b/.github/workflows/minor-release-latest.yml index c37cdca9..a09b1131 100644 --- a/.github/workflows/minor-release-latest.yml +++ b/.github/workflows/minor-release-latest.yml @@ -55,10 +55,8 @@ jobs: run: | BRANCH_NAME="update-minor-$(date +%s)" git checkout -b $BRANCH_NAME - npx lerna version minor --yes --force-git-tag - git add . - git commit -m "chore: bump minor version" git push origin $BRANCH_NAME + npx lerna version minor --yes --force-git-tag gh pr create --title "[skip] chore: bump minor version" --body "This PR bumps the minor version." --base main --head $BRANCH_NAME env: GITHUB_TOKEN: ${{ secrets.IQ_ADM_TIM_TOKEN }} From 92829be90c6ad05ca639cc9cd7e367f6cef694fd Mon Sep 17 00:00:00 2001 From: Tiago Vaz Date: Tue, 14 Oct 2025 11:28:37 -0300 Subject: [PATCH 2/4] fix: minor ci --- .github/workflows/minor-release-latest.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/minor-release-latest.yml b/.github/workflows/minor-release-latest.yml index a09b1131..752d25d2 100644 --- a/.github/workflows/minor-release-latest.yml +++ b/.github/workflows/minor-release-latest.yml @@ -51,12 +51,23 @@ jobs: - name: Revert ephemeral commit run: | git reset --hard HEAD~1 - - name: Create branch and PR to main + - name: Define branch name + id: define-branch + run: echo "::set-output name=branch_name::update-minor-$(date +%s)" + - name: Create branch and bump version run: | - BRANCH_NAME="update-minor-$(date +%s)" - git checkout -b $BRANCH_NAME - git push origin $BRANCH_NAME + git checkout -b ${{ steps.define-branch.outputs.branch_name }} + git push origin ${{ steps.define-branch.outputs.branch_name }} npx lerna version minor --yes --force-git-tag - gh pr create --title "[skip] chore: bump minor version" --body "This PR bumps the minor version." --base main --head $BRANCH_NAME + - name: Open PR to main + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ steps.define-branch.outputs.branch_name }} + base: main + title: "[skip] chore: bump minor version" + body: | + This PR bumps the minor version. + commit-message: "chore: bump minor version" env: GITHUB_TOKEN: ${{ secrets.IQ_ADM_TIM_TOKEN }} From d765269a4c3ba197a2229ff5b80ceb95c38c65b2 Mon Sep 17 00:00:00 2001 From: Tiago Vaz Date: Tue, 14 Oct 2025 14:33:40 -0300 Subject: [PATCH 3/4] test: new workflow to test open pr with action --- .github/workflows/test-pr-creation.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test-pr-creation.yml diff --git a/.github/workflows/test-pr-creation.yml b/.github/workflows/test-pr-creation.yml new file mode 100644 index 00000000..15e58b3a --- /dev/null +++ b/.github/workflows/test-pr-creation.yml @@ -0,0 +1,40 @@ +name: Test PR Creation + +on: + push: + branches: + - ci/fix/minor-create + +permissions: + contents: write + pull-requests: write + +jobs: + test-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Define branch name + id: define-branch + run: echo "::set-output name=branch_name::test-pr-$(date +%s)" + + - name: Create branch and bump version + run: | + git checkout -b ${{ steps.define-branch.outputs.branch_name }} + git push origin ${{ steps.define-branch.outputs.branch_name }} + npx lerna version patch --yes + + - name: Open PR to main + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ steps.define-branch.outputs.branch_name }} + base: main + title: "[skip] Validate PR creation" + body: | + This is a test PR to validate the workflow logic. + commit-message: "test: validate PR creation" From 8281dfbdeb151ab9a7057bef541e9fae6f5b2b11 Mon Sep 17 00:00:00 2001 From: Tiago Vaz Date: Tue, 14 Oct 2025 14:36:27 -0300 Subject: [PATCH 4/4] fix: remove tst file --- .github/workflows/test-pr-creation.yml | 40 -------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/test-pr-creation.yml diff --git a/.github/workflows/test-pr-creation.yml b/.github/workflows/test-pr-creation.yml deleted file mode 100644 index 15e58b3a..00000000 --- a/.github/workflows/test-pr-creation.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Test PR Creation - -on: - push: - branches: - - ci/fix/minor-create - -permissions: - contents: write - pull-requests: write - -jobs: - test-pr: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Define branch name - id: define-branch - run: echo "::set-output name=branch_name::test-pr-$(date +%s)" - - - name: Create branch and bump version - run: | - git checkout -b ${{ steps.define-branch.outputs.branch_name }} - git push origin ${{ steps.define-branch.outputs.branch_name }} - npx lerna version patch --yes - - - name: Open PR to main - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ steps.define-branch.outputs.branch_name }} - base: main - title: "[skip] Validate PR creation" - body: | - This is a test PR to validate the workflow logic. - commit-message: "test: validate PR creation"