From 93b4e6a8d0a55a7867848f3acfa622afa3d6694b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:15:18 +0200 Subject: [PATCH 1/8] Update build job. --- .github/workflows/release.yml | 97 ++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed4d4888e9..5f49193cd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ on: - cron: '0 3 * * MON' jobs: - build: + prepare: runs-on: ubuntu-latest steps: - name: Checkout @@ -59,6 +59,26 @@ jobs: git config user.email release@firefly-iii.org git config advice.addIgnoredFile false git config push.autoSetupRemote true + - name: Install dependencies + run: | + rm -rf vendor composer.lock + composer update --no-dev --no-scripts --no-plugins -q + validate: + runs-on: ubuntu-latest + steps: + - name: Run PHP Coding Standards Fixer + run: | + sudo chown -R runner:docker resources/lang + .ci/phpcs.sh || true + - name: Code cleanup + id: code-cleanup + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:code' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' - name: Lint PHP run: | php_lint_file() @@ -80,7 +100,10 @@ jobs: then exit 1 fi - - name: Crowdin action + translate: + runs-on: ubuntu-latest + steps: + - name: Download translations uses: crowdin/github-action@v2 with: upload_sources: true @@ -91,6 +114,36 @@ jobs: GITHUB_TOKEN: ${{ github.token }} CROWDIN_PROJECT_NR: ${{ secrets.CROWDIN_PROJECT_NR }} CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} + - name: Generate JSON v1 + id: json-v1 + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:json-translations v1' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' + - name: Generate JSON v2 + id: json-v2 + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:json-translations v2' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' + generate-js: + runs-on: ubuntu-latest + steps: + - name: Build JS + run: | + npm install + npm run prod --workspace=v1 + npm run build --workspace=v2 + npm update + build: + runs-on: ubuntu-latest + steps: - name: Cleanup changelog id: cleanup-changelog uses: JC5/firefly-iii-dev@main @@ -119,48 +172,8 @@ jobs: FIREFLY_III_ROOT: /github/workspace GH_TOKEN: "" FF_III_VERSION: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} - - name: Generate JSON v1 - id: json-v1 - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:json-translations v1' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - - name: Generate JSON v2 - id: json-v2 - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:json-translations v2' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - - name: Code cleanup - id: code-cleanup - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:code' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - - name: Build JS - run: | - npm install - npm run prod --workspace=v1 - npm run build --workspace=v2 - npm update - - name: Run CI - run: | - rm -rf vendor composer.lock - composer update --no-dev --no-scripts --no-plugins -q - sudo chown -R runner:docker resources/lang - .ci/phpcs.sh || true - name: Calculate variables run: | - # set some variables releaseName=$version originalName=$version From bd14797da649e2f409f38851f01fa2619cc09a52 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:16:55 +0200 Subject: [PATCH 2/8] Fix dependencies. --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f49193cd5..98d46c025e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,6 +64,8 @@ jobs: rm -rf vendor composer.lock composer update --no-dev --no-scripts --no-plugins -q validate: + needs: + - prepare runs-on: ubuntu-latest steps: - name: Run PHP Coding Standards Fixer @@ -101,6 +103,8 @@ jobs: exit 1 fi translate: + needs: + - prepare runs-on: ubuntu-latest steps: - name: Download translations @@ -133,6 +137,9 @@ jobs: FIREFLY_III_ROOT: /github/workspace GH_TOKEN: '' generate-js: + needs: + - prepare + - translate runs-on: ubuntu-latest steps: - name: Build JS @@ -142,6 +149,11 @@ jobs: npm run build --workspace=v2 npm update build: + needs: + - prepare + - validate + - translate + - generate-js runs-on: ubuntu-latest steps: - name: Cleanup changelog From 1fe9bf7d76836447d6d26de46be0340a2c381653 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:18:48 +0200 Subject: [PATCH 3/8] Clean up job. --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98d46c025e..f5a48694b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -148,12 +148,9 @@ jobs: npm run prod --workspace=v1 npm run build --workspace=v2 npm update - build: + cleanup-meta: needs: - prepare - - validate - - translate - - generate-js runs-on: ubuntu-latest steps: - name: Cleanup changelog @@ -247,6 +244,15 @@ jobs: echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_ENV" env: version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} + build: + needs: + - prepare + - validate + - translate + - generate-js + - cleanup-meta + runs-on: ubuntu-latest + steps: - name: Commit all changes run: | # add all content, except output.txt (this contains the changelog and/or the download instructions) From ab6799442ca6c45e716679b73e357a4c2d032f44 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:19:20 +0200 Subject: [PATCH 4/8] Fix job again. --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5a48694b5..4fdd2c6103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,6 @@ jobs: steps: - name: Run PHP Coding Standards Fixer run: | - sudo chown -R runner:docker resources/lang .ci/phpcs.sh || true - name: Code cleanup id: code-cleanup From c7f37010535ab6181fbd4f9062e38a66b4618381 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:22:51 +0200 Subject: [PATCH 5/8] Add command to see where we end up. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fdd2c6103..cac566a5f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: export -f php_lint_file - find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 php_lint_file {} + find . -path ./vendor -prune -o -name '*.php' | parallel -j 8 php_lint_file {} if [ "$?" -ne 0 ] then @@ -182,6 +182,8 @@ jobs: FF_III_VERSION: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} - name: Calculate variables run: | + ls + pwd # set some variables releaseName=$version originalName=$version @@ -245,9 +247,7 @@ jobs: version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} build: needs: - - prepare - validate - - translate - generate-js - cleanup-meta runs-on: ubuntu-latest From 5eb828bff8a0ba4c6c2d5c16b1b29a97b732b4c4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:24:16 +0200 Subject: [PATCH 6/8] Force order. But I think steps need dependencies, not jobs. --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cac566a5f4..93c7b08866 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: fi translate: needs: - - prepare + - validate runs-on: ubuntu-latest steps: - name: Download translations @@ -137,7 +137,6 @@ jobs: GH_TOKEN: '' generate-js: needs: - - prepare - translate runs-on: ubuntu-latest steps: @@ -149,7 +148,7 @@ jobs: npm update cleanup-meta: needs: - - prepare + - generate-js runs-on: ubuntu-latest steps: - name: Cleanup changelog @@ -247,8 +246,6 @@ jobs: version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} build: needs: - - validate - - generate-js - cleanup-meta runs-on: ubuntu-latest steps: From dd06838eec713640d35d937e817b5b652bbe94fe Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:27:36 +0200 Subject: [PATCH 7/8] Reshuffle dependencies. --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93c7b08866..38278132b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: fi translate: needs: - - validate + - prepare runs-on: ubuntu-latest steps: - name: Download translations @@ -137,6 +137,7 @@ jobs: GH_TOKEN: '' generate-js: needs: + - prepare - translate runs-on: ubuntu-latest steps: @@ -148,7 +149,7 @@ jobs: npm update cleanup-meta: needs: - - generate-js + - prepare runs-on: ubuntu-latest steps: - name: Cleanup changelog @@ -246,6 +247,10 @@ jobs: version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} build: needs: + - prepare + - validate + - translate + - generate-js - cleanup-meta runs-on: ubuntu-latest steps: From a29742fe1f249a9c55d276918f767af8c1dbfe0a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Aug 2025 11:31:03 +0200 Subject: [PATCH 8/8] Never mind lol. --- .github/workflows/release.yml | 118 +++++++++++++--------------------- 1 file changed, 43 insertions(+), 75 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38278132b9..ed4d4888e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ on: - cron: '0 3 * * MON' jobs: - prepare: + build: runs-on: ubuntu-latest steps: - name: Checkout @@ -59,27 +59,6 @@ jobs: git config user.email release@firefly-iii.org git config advice.addIgnoredFile false git config push.autoSetupRemote true - - name: Install dependencies - run: | - rm -rf vendor composer.lock - composer update --no-dev --no-scripts --no-plugins -q - validate: - needs: - - prepare - runs-on: ubuntu-latest - steps: - - name: Run PHP Coding Standards Fixer - run: | - .ci/phpcs.sh || true - - name: Code cleanup - id: code-cleanup - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:code' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - name: Lint PHP run: | php_lint_file() @@ -95,18 +74,13 @@ jobs: export -f php_lint_file - find . -path ./vendor -prune -o -name '*.php' | parallel -j 8 php_lint_file {} + find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 php_lint_file {} if [ "$?" -ne 0 ] then exit 1 fi - translate: - needs: - - prepare - runs-on: ubuntu-latest - steps: - - name: Download translations + - name: Crowdin action uses: crowdin/github-action@v2 with: upload_sources: true @@ -117,41 +91,6 @@ jobs: GITHUB_TOKEN: ${{ github.token }} CROWDIN_PROJECT_NR: ${{ secrets.CROWDIN_PROJECT_NR }} CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} - - name: Generate JSON v1 - id: json-v1 - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:json-translations v1' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - - name: Generate JSON v2 - id: json-v2 - uses: JC5/firefly-iii-dev@main - with: - action: 'ff3:json-translations v2' - output: '' - env: - FIREFLY_III_ROOT: /github/workspace - GH_TOKEN: '' - generate-js: - needs: - - prepare - - translate - runs-on: ubuntu-latest - steps: - - name: Build JS - run: | - npm install - npm run prod --workspace=v1 - npm run build --workspace=v2 - npm update - cleanup-meta: - needs: - - prepare - runs-on: ubuntu-latest - steps: - name: Cleanup changelog id: cleanup-changelog uses: JC5/firefly-iii-dev@main @@ -180,10 +119,48 @@ jobs: FIREFLY_III_ROOT: /github/workspace GH_TOKEN: "" FF_III_VERSION: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} + - name: Generate JSON v1 + id: json-v1 + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:json-translations v1' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' + - name: Generate JSON v2 + id: json-v2 + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:json-translations v2' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' + - name: Code cleanup + id: code-cleanup + uses: JC5/firefly-iii-dev@main + with: + action: 'ff3:code' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: '' + - name: Build JS + run: | + npm install + npm run prod --workspace=v1 + npm run build --workspace=v2 + npm update + - name: Run CI + run: | + rm -rf vendor composer.lock + composer update --no-dev --no-scripts --no-plugins -q + sudo chown -R runner:docker resources/lang + .ci/phpcs.sh || true - name: Calculate variables run: | - ls - pwd + # set some variables releaseName=$version originalName=$version @@ -245,15 +222,6 @@ jobs: echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_ENV" env: version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} - build: - needs: - - prepare - - validate - - translate - - generate-js - - cleanup-meta - runs-on: ubuntu-latest - steps: - name: Commit all changes run: | # add all content, except output.txt (this contains the changelog and/or the download instructions)