Skip to content

Commit 615fc84

Browse files
authored
Merge pull request #118 from JaegerCaiser/release/ci-workflow-fixes
Release: CI Workflow Fixes
2 parents 49cc1c5 + 831dd97 commit 615fc84

File tree

5 files changed

+43
-7
lines changed

5 files changed

+43
-7
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Se qualquer pré-condição falhar, não executar a ação; informe o usuário e
7777

7878
- Execute diretamente no terminal
7979
- Exemplos: `gh pr create`, `gh pr edit`, `gh pr merge`, `gh repo clone`
80-
- **Para PRs complexas**: Crie temporariamente um arquivo `.md` com a descrição completa e use `--body-file arquivo.md` para `gh pr create` ou `gh pr edit`
80+
- **Para TODAS as PRs**: Crie temporariamente um arquivo `.md` com a descrição completa e use `--body-file arquivo.md` para `gh pr create` ou `gh pr edit`
8181
- **Como criar arquivos temporários**: Use a ferramenta `create_file` diretamente ao invés de comandos no terminal com `EOF` para manter o terminal limpo
8282
- **Exemplo**: Crie `pr_description.md` usando `create_file`, depois use `--body-file pr_description.md`
8383

@@ -529,5 +529,5 @@ $transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
529529

530530
---
531531

532-
_Atualizado em: 4 de novembro de 2025_
532+
_Atualizado em: 6 de novembro de 2025_
533533
_Próxima revisão: Quando necessário_

.github/workflows/create-beta-release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,22 @@ jobs:
3232
if [ "$PR_COUNT" -gt 0 ]; then
3333
echo "Found open PR. Semantic release will not run on this push."
3434
echo "should_run=false" >> $GITHUB_OUTPUT
35-
else
36-
echo "No open PR found. Proceeding with semantic-release."
37-
echo "should_run=true" >> $GITHUB_OUTPUT
35+
exit 0
3836
fi
37+
38+
# Check for other active release branches
39+
OTHER_RELEASE_BRANCHES=$(gh api repos/${{ github.repository }}/branches --jq '.[] | select(.name | startswith("release/")) | select(.name != "'$BRANCH_NAME'") | .name' | tr '\n' ' ')
40+
OTHER_COUNT=$(echo "$OTHER_RELEASE_BRANCHES" | wc -w)
41+
42+
if [ "$OTHER_COUNT" -gt 0 ]; then
43+
echo "❌ Found $OTHER_COUNT other release branches: $OTHER_RELEASE_BRANCHES"
44+
echo "Multiple release branches are not allowed. Please merge or delete conflicting branches."
45+
echo "should_run=false" >> $GITHUB_OUTPUT
46+
exit 1
47+
fi
48+
49+
echo "No open PR found and no conflicting release branches. Proceeding with semantic-release."
50+
echo "should_run=true" >> $GITHUB_OUTPUT
3951
env:
4052
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4153

.github/workflows/sync-main-to-develop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Create or Update Pull Request
7777
if: steps.merge.outputs.sync_needed == 'true'
7878
env:
79-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
GH_TOKEN: ${{ secrets.GH_PAT_FOR_RELEASE }}
8080
BRANCH_NAME: ${{ steps.merge.outputs.branch_name }}
8181
run: |
8282
EXISTING_PR_URL=$(gh pr list --base develop --head "$BRANCH_NAME" --state open --json url --jq '.[0].url')

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## [1.2.2-beta.1](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.1...v1.2.2-beta.1) (2025-11-06)
2+
3+
4+
### Bug Fixes
5+
6+
* **ci:** add validation for multiple release branches in beta workflow ([31b8f45](https://github.com/JaegerCaiser/mrdeveloper/commit/31b8f45735db202528389a21e9698ac78cb1d936))
7+
* **ci:** use PAT instead of GITHUB_TOKEN for PR creation in sync workflow ([7c0a069](https://github.com/JaegerCaiser/mrdeveloper/commit/7c0a0694859703a5bc95d8631b119436f030c45c))
8+
* prevent duplicate production workflow runs ([3571cb7](https://github.com/JaegerCaiser/mrdeveloper/commit/3571cb7c82ef84cf66be33dd6e4bdb7256a24bc2))
9+
* prevent update-pr-comment job from running without code changes ([25d00d7](https://github.com/JaegerCaiser/mrdeveloper/commit/25d00d790f53c5da1896fe26d12f7278d51e220c))
10+
11+
## [1.2.1](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.0...v1.2.1) (2025-11-06)
12+
13+
14+
### Bug Fixes
15+
16+
* **ci:** correct gh pr list command syntax in sync workflow ([67b9c21](https://github.com/JaegerCaiser/mrdeveloper/commit/67b9c21c5e37732c77c45e39d792bdf3b7a0a3ea))
17+
18+
## [1.2.1-beta.1](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.0...v1.2.1-beta.1) (2025-11-06)
19+
20+
21+
### Bug Fixes
22+
23+
* **ci:** correct gh pr list command syntax in sync workflow ([67b9c21](https://github.com/JaegerCaiser/mrdeveloper/commit/67b9c21c5e37732c77c45e39d792bdf3b7a0a3ea))
24+
125
# [1.2.0](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.1.5...v1.2.0) (2025-11-06)
226

327

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mrdeveloper",
3-
"version": "1.2.0",
3+
"version": "1.2.2-beta.1",
44
"type": "module",
55
"packageManager": "[email protected]",
66
"homepage": "https://www.mrdeveloper.com.br/",

0 commit comments

Comments
 (0)