Skip to content

Commit 6b51619

Browse files
frederic34claude
andcommitted
FIX: restructure GitHub Actions workflows
changelog.yml (release): - Remove lerna-changelog step that overwrote manual ChangeLog.md (lerna-changelog requires labeled PRs, not direct commits) - Add if condition to skip on Bump version commits (break infinite loop) - Fix mkdir -p and merge zip steps main.yml (CI lint): - Remove version bump and git-auto-commit steps (only in changelog.yml) - Clean lint-only workflow, safe to run on pull_request too Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0cc0b2a commit 6b51619

2 files changed

Lines changed: 6 additions & 30 deletions

File tree

.github/workflows/changelog.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
build:
9+
release:
1010
runs-on: ubuntu-latest
11+
# Skip commits already made by this workflow to avoid infinite loop
12+
if: "!contains(github.event.head_commit.message, 'Bump version')"
1113

1214
steps:
1315
- uses: actions/checkout@v4
@@ -26,9 +28,6 @@ jobs:
2628
node-version: '22'
2729
registry-url: 'https://registry.npmjs.org'
2830

29-
- name: Print PHP version
30-
run: echo ${{ steps.setup-php.outputs.php-version }}
31-
3231
- name: Run autotranslator
3332
run: |
3433
php ./.tx/autotranslator.php fr_FR it_IT ${{ secrets.GOOGLE_API_TRANSLATE }}
@@ -37,11 +36,6 @@ jobs:
3736
php ./.tx/autotranslator.php fr_FR es_ES ${{ secrets.GOOGLE_API_TRANSLATE }}
3837
php ./.tx/autotranslator.php fr_FR de_DE ${{ secrets.GOOGLE_API_TRANSLATE }}
3938
40-
- name: Run changelog
41-
run: npx lerna-changelog --from=v0.0.0 > ChangeLog.md
42-
env:
43-
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
44-
4539
- name: Bump version and push tag
4640
uses: frederic34/github-dolibarr-action@main
4741
env:
@@ -57,11 +51,10 @@ jobs:
5751

5852
- name: Zip Folder
5953
run: |
60-
ls -al
61-
mkdir build/htdocs
54+
mkdir -p build/htdocs
6255
rsync -arv --exclude='.git/' --exclude='.github/' --exclude='.gitignore' --exclude='.tx/' --exclude='build/' --exclude='codesniffer/' . ./build/htdocs/idreamanewcalendar
6356
64-
- name: Switch to Release Folder
57+
- name: Create release zip
6558
run: |
6659
cd build
6760
zip -r module_idreamanewcalendar-${{ env.module_version }}.zip htdocs

.github/workflows/main.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
build:
11+
lint:
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -34,20 +34,3 @@ jobs:
3434

3535
- name: Run VarDump Check
3636
run: var-dump-check --extensions php --tracy --exclude vendor/ .
37-
38-
- name: Bump version and push tag
39-
uses: frederic34/github-dolibarr-action@main
40-
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
REPO_OWNER: frederic34
43-
RELEASE_BRANCH: main
44-
MODULE: idreamanewcalendar
45-
CLASSNAME: IDreamANewCalendar
46-
RELEASE_BRANCHES: main
47-
DEFAULT_BUMP: none
48-
INITIAL_VERSION: v0.0.0
49-
VERBOSE: true
50-
51-
- uses: stefanzweifel/git-auto-commit-action@v5
52-
with:
53-
commit_message: Bump version #none

0 commit comments

Comments
 (0)