From ec59f80fe3c18d408382e4916dec9d95eb45b556 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 22 Jan 2024 06:17:26 +0100 Subject: [PATCH 1/3] Fix label actions. --- .github/label-actions.yml | 46 ++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/label-actions.yml b/.github/label-actions.yml index aa0909dc36..6c9982d2cc 100644 --- a/.github/label-actions.yml +++ b/.github/label-actions.yml @@ -5,7 +5,9 @@ feature: issues: # Post a comment, `{issue-author}` is an optional placeholder comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! + + This is an automatic reply. `Share and enjoy` This issue has been marked as a feature request. The requested (new) feature will become a part of Firefly III or the data importer in due course. @@ -13,11 +15,29 @@ feature: Thank you for your contributions. +epic: + issues: + # Post a comment, `{issue-author}` is an optional placeholder + comment: | + Hi there! + + This is an automatic reply. `Share and enjoy` + + This issue has been marked as an epic. In epics, large amounts of works are collected that will be part of a major new feature. If you have more ideas that could be a part of this epic, feel free to reply. + + *However*, please be aware there is NO need to reply with "+1" or "me too" or "I need this too" or whatever. Such comments are not helpful, and do not influence [the roadmap](https://roadmap.firefly-iii.org/). Your comment may be :skull: deleted. + + If you are merely interested in this epic's progress, you can subscribe to this issue to get updates. + + Thank you for your contributions. + enhancement: issues: # Post a comment, `{issue-author}` is an optional placeholder comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! + + This is an automatic reply. `Share and enjoy` This issue has been marked as an enhancement. The requested enhancement to an existing feature will become a part of Firefly III or the data importer in due course. @@ -25,12 +45,13 @@ enhancement: Thank you for your contributions. -# The `solved` label is added to discussions triage: issues: # Post a comment, `{issue-author}` is an optional placeholder comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! + + This is an automatic reply. `Share and enjoy` This issue has been marked as being in triage. The root cause is not known yet, or the issue needs more investigation. You can help by sharing debug information (from `/debug`) if you also have this issue or when you haven't already done so. @@ -39,13 +60,14 @@ triage: needs-moar-debug: issues: comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! - To learn more about this issue, please share the output of the `/debug` page of your Firefly III installation. + This is an automatic reply. `Share and enjoy` - If this page is no available due to the issue you have, please make sure you share at least: + To learn more about this issue, please make sure you share at least: - 1. Firefly III version + 1. The table you can find on the `/debug` page + 2. Firefly III version 2. Docker, self-hosted, or hosted by a third party? 3. Operating system and browser @@ -56,7 +78,9 @@ needs-moar-debug: needs-moar-logs: issues: comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! + + This is an automatic reply. `Share and enjoy` To learn more about this issue, please share the relevant log files from your Firefly III or data importer installation. @@ -70,7 +94,9 @@ needs-moar-logs: v2-layout-issue: issues: comment: | - Hi there! This is an automatic reply. `Share and enjoy` + Hi there! + + This is an automatic reply. `Share and enjoy` It seems your issue is about the new v2-layout that is currently in development for Firefly III. From fadf799b9c34eadbe324a178783addcd48b2b371 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 28 Jan 2024 12:41:23 +0100 Subject: [PATCH 2/3] Add new workflow. --- .github/workflows/cleanup.yml | 1 + .github/workflows/release.yml | 156 ++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index e4280b3b4b..38043b5e04 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -62,6 +62,7 @@ jobs: 'depsreview.yml', 'label-actions.yml', 'lock.yml', + 'release.yml', 'sonarcloud.yml', 'stale.yml' ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..14fb907f36 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,156 @@ +name: 'Code - Create new release' + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true + default: 'develop' + schedule: + - cron: '30 2 * * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Switch branch + run: | + if [[ "develop" == "$version" ]]; then + git checkout --track origin/develop + git pull + else + git config user.name github-actions + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git checkout --track origin/develop + git pull + git checkout main + git merge develop + fi + env: + version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: mbstring, intl, zip, bcmath + - name: crowdin action + uses: crowdin/github-action@v1 + with: + upload_sources: true + download_translations: true + push_translations: false + push_sources: false + env: + GITHUB_TOKEN: ${{ github.token }} + CROWDIN_PROJECT_NR: ${{ secrets.CROWDIN_PROJECT_NR }} + CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} + - name: Cleanup translations + id: cleanup-transactions + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:crowdin-warning' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Cleanup changelog + id: cleanup-changelog + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:changelog' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Generate JSON v1 + id: json-v1 + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:json-translations v1' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Generate JSON v2 + id: json-v2 + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:json-translations v2' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Code cleanup + id: code-cleanup + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:code' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Build new JS + run: | + npm upgrade + npm run build + - name: Build old JS + id: old-js + uses: JC5/firefly-iii-dev@v16 + with: + action: 'ff3:old-js' + output: '' + env: + FIREFLY_III_ROOT: /github/workspace + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Run CI + run: | + rm -rf vendor composer.lock + composer validate --strict + composer update --no-dev --no-scripts --no-plugins -q + sudo chown -R runner:docker resources/lang + .ci/phpcs.sh + - name: Release + run: | + echo "1" + git config user.name github-actions + echo "2" + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + echo "3" + git config advice.addIgnoredFile false + echo "4" + git add -A + echo "5" + git commit -m "Auto commit for release '$version' on $(date +'%Y-%m-%d')" || true + echo "6" + git push + if [[ "develop" == "$version" ]]; then + + [[ -z $(git status --untracked-files=normal --porcelain) ]] && echo "this branch is clean, no need to push..." && exit 0; + + echo "Create nightly release." + git tag -a $version-$(date +'%Y%m%d') -m "Release '$version' on $(date +'%Y-%m-%d')" + git push origin $version-$(date +'%Y%m%d') + gh release create $version-$(date +'%Y%m%d') -p -t "Nightly develop release $(date +'%Y%m%d')" --verify-tag + else + echo "Create default release." + git tag -a $version -m "Here be changelog" + echo "7" + git push origin $version + echo "8" + gh release create $version --notes-from-tag -t "$version" --verify-tag + echo "9" + git checkout develop + echo "10" + git merge main + echo "11" + git push + echo "12" + fi + env: + GH_TOKEN: ${{ github.token }} + version: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }} From 44701f16339a0e363fc2faf682ad122694c68f7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 28 Jan 2024 14:25:38 +0100 Subject: [PATCH 3/3] Clean up workflow. --- .github/workflows/release.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14fb907f36..bebf72dd40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,22 +116,19 @@ jobs: .ci/phpcs.sh - name: Release run: | - echo "1" git config user.name github-actions - echo "2" git config user.email 41898282+github-actions[bot]@users.noreply.github.com - echo "3" git config advice.addIgnoredFile false - echo "4" - git add -A - echo "5" - git commit -m "Auto commit for release '$version' on $(date +'%Y-%m-%d')" || true - echo "6" - git push + if [[ "develop" == "$version" ]]; then - [[ -z $(git status --untracked-files=normal --porcelain) ]] && echo "this branch is clean, no need to push..." && exit 0; + fi + git add -A + git commit -m "Auto commit for release '$version' on $(date +'%Y-%m-%d')" || true + git push + + if [[ "develop" == "$version" ]]; then echo "Create nightly release." git tag -a $version-$(date +'%Y%m%d') -m "Release '$version' on $(date +'%Y-%m-%d')" git push origin $version-$(date +'%Y%m%d')