diff --git a/README.md b/README.md index 3506054..c4b0864 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,85 @@ ## About -A template utilizing Refined Architect. +A template utilizing [Refined Architect](https://github.com/refinedmods/refinedarchitect). + +### How to use this template + +- Clone the repository. +- Update `README.md`: + - Remove this explanation. + - Update the title. + - Update the build badge URL. +- Update [Refined Architect](https://github.com/refinedmods/refinedarchitect) when necessary: + - Search and replace the version number in the project. + - This should change the version in `settings.gradle.kts` and the GitHub actions. +- Update the URLs in `.github/CONTRIBUTING.md`. +- Update the project name in `.github/workflows/publish-release.yml`. +- Update the branch policies for `develop`: + - Require a pull request before merging. + - Dismiss stale pull request approvals when new commits are pushed. + - Require status checks to pass before merging: + - `validate-commit-messages` + - `validate-changelog` + - `validate-branch-name` + - `build` + - Require branches to be up to date before merging. + - Require conversation resolution before merging. + - Do not allow bypassing the above settings. +- Set the tags on the GitHub repository. +- Set some GitHub repository settings: + - Only allow issues. + - Preserve this repository. + - Only allow merge commits. + - Allow auto-merge. + - Automatically delete head branches. +- Ensure that the workflows can create PRs and push to the repository: + - Under [Fine-granted personal access tokens](https://github.com/settings/tokens?type=beta), change the repository access for "Gitflow push token". + - Under [GitHub Actions secrets](https://github.com/organizations/refinedmods/settings/secrets/actions/GITFLOW_PUSH_TOKEN), change the repository access for the `GITFLOW_PUSH_TOKEN` secret. +- Create a `main` branch from `develop` as soon as you are ready. Apply the same branch policies from `develop`. +- Start a "Draft release" workflow to start the release process. + +### Optional: Set-up Crowdin + +- Create a project on Crowdin. +- Copy the `examples/crowdin.yml` file to the root directory as `crowdin.yml`. + - Configure the project identifier and source translation file location. +- Add the Crowdin badge to `README.md` from `examples/crowdin-badge.md`. +- On Crowdin, configure the GitHub integration: + - Choose "Source and translation files mode". + - Select the repository and the `develop` branch. + - Service Branch Name should be `crowdin-translations`. + - Configure the Sync Schedule to 24 hours. + +### Optional: Set-up SonarQube + +- Create a project on SonarCloud. +- For Analysis Method, disable Automatic Analysis. +- In `build.gradle.kts`, uncomment the `sonarQube` function. +- Add SonarQube build badges to `README.md` from `examples/sonarqube-badges.md`. + +### Optional: Add a webhook for Discord announcements + +- Add a repository webhook for Discord announcements. + - Content type: `application/json`. +- Events: + - Branch or tag creation + - Forks + - Issue comments + - Issues + - Milestones + - Pull requests + - Pull request reviews + - Pushes + - Releases + - Stars + - Watches + +### Optional: Set-up CurseForge and Modrinth publishing + +- Create projects on CurseForge and Modrinth. +- Configure publishing in the `build.gradle.kts` file of the NeoForge and Fabric subprojects. +- Add CurseForge and Modrinth download count badges to `README.md` from `examples/curseforge-modrinth-badges.md`. ## Links diff --git a/examples/crowdin-badge.md b/examples/crowdin-badge.md new file mode 100644 index 0000000..fa66fd4 --- /dev/null +++ b/examples/crowdin-badge.md @@ -0,0 +1 @@ +[![Crowdin](https://badges.crowdin.net/refined-storage-2/localized.svg)](https://crowdin.com/project/refined-storage-2) \ No newline at end of file diff --git a/examples/crowdin.yml b/examples/crowdin.yml new file mode 100644 index 0000000..3a7cd2f --- /dev/null +++ b/examples/crowdin.yml @@ -0,0 +1,128 @@ +project_identifier: change-me +commit_message: "chore: update translation %language% from crowdin" +append_commit_message: false +api_key_env: CROWDIN_API_KEY +base_path: . +pull_request_labels: + - skip-changelog +files: + - source: /change-me/src/main/resources/assets/change-me/lang/en_us.json + translation: /change-me/src/main/resources/assets/change-me/lang/%locale_with_underscore%.json + languages_mapping: + locale_with_underscore: + af: af_za + ar: ar_sa + ast: ast_es + az: az_az + ba: ba_ru + be: be_by + bg: bg_bg + br-FR: br_fr + bs: bs_ba + ca: ca_es + cs: cs_cz + cy: cy_gb + da: da_dk + de-AT: de_at + de-CH: de_ch + de: de_de + el: el_gr + en-AU: en_au + en-CA: en_ca + en-GB: en_gb + en-NZ: en_nz + en-PT: en_pt + en-US: en_us + en-ZA: en_za + eo: eo_uy + es-AR: es_ar + es-CL: es_cl + es-ES: es_es + es-MX: es_mx + es-UY: es_uy + es-VE: es_ve + et: et_ee + eu: eu_es + fa: fa_ir + fi: fi_fi + fil: fil_ph + fo: fo_fo + fr-CA: fr_ca + fr: fr_fr + fra-DE: fra_de + fy-NL: fy_nl + ga-IE: ga_ie + gd: gd_gb + gl: gl_es + got: got_de + gv: gv_im + haw: haw_us + he: he_il + hi: hi_in + hr: hr_hr + hu: hu_hu + hy-AM: hy_am + id: id_id + ig: ig_ng + ido: io_en + is: is_is + it: it_it + ja: ja_jp + jbo: jbo_en + ka: ka_ge + kab: kab_kab + kk: kk_kz + kn: kn_in + ko: ko_kr + kw: kw_gb + la-LA: la_va + lb: lb_lu + li: li_li + lol: lol_us + lt: lt_lt + lv: lv_lv + mi: mi_nz + mk: mk_mk + mn: mn_mn + moh: moh_ca + ms: ms_my + mt: mt_mt + nb: nb_no + nds: nds_de + nl-BE: nl_be + nl: nl_nl + nn-NO: nn_no + #no: nn_no + oc: oc_fr + oj: oj_ca + pl: pl_pl + pt-BR: pt_br + pt-PT: pt_pt + qya-AA: qya_aa + ro: ro_ro + ru: ru_ru + sk: sk_sk + sl: sl_si + so: so_so + sq: sq_al + sr: sr_sp + sr-CS: sr_cs + sv-SE: sv_se + ta: ta_in + th: th_th + tl: tl_ph + tlh-AA: tlh_aa + tr: tr_tr + tt-RU: tt_ru + tzl: tzl_tzl + uk: uk_ua + val-ES: val_es + vec: vec_it + vi: vi_vn + yi: yi_de + yo: yo_ng + zh-CN: zh_cn + zh-TW: zh_tw + zh-HK: zh_hk + fur-IT: fur_it + ry: ry_ua \ No newline at end of file diff --git a/examples/curseforge-modrinth-badges.md b/examples/curseforge-modrinth-badges.md new file mode 100644 index 0000000..d6ec747 --- /dev/null +++ b/examples/curseforge-modrinth-badges.md @@ -0,0 +1 @@ +[![Downloads on CurseForge](http://cf.way2muchnoise.eu/full_243076_downloads.svg)](http://minecraft.curseforge.com/projects/refined-storage) [![Downloads on Modrinth](https://img.shields.io/modrinth/dt/refined-storage?logo=modrinth)](https://modrinth.com/mod/refined-storage) \ No newline at end of file diff --git a/examples/sonarqube-badges.md b/examples/sonarqube-badges.md new file mode 100644 index 0000000..c7715ce --- /dev/null +++ b/examples/sonarqube-badges.md @@ -0,0 +1 @@ +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage2&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage2) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage2&metric=coverage)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage2) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage2&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage2) \ No newline at end of file