From e840928458305e6eef1cec030e4a76501201bfe6 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Fri, 20 Oct 2023 23:50:38 +0200 Subject: [PATCH] ci: bump magic_combo to 0.2 (#4) * ci: use magic_combo 0.2 * chore(changelog): add changelog entry for the magic_combo bump * ci: update allowed scopes * ci: simplify versions setup * ci: trigger build on pull_request * ci: use magic_combo as action * chore: update contributing * chore(readme): fix readme lint --- .combo.yaml | 5 ++ .github/workflows/build.yml | 19 +++--- .github/workflows/lint_pr_title.yml | 5 +- .godot_version | 1 - .version | 1 - CHANGELOG.md | 1 + CONTRIBUTING.md | 64 ++++++++++---------- Makefile | 92 ----------------------------- README.md | 7 ++- 9 files changed, 56 insertions(+), 139 deletions(-) create mode 100644 .combo.yaml delete mode 100644 .godot_version delete mode 100644 .version delete mode 100644 Makefile diff --git a/.combo.yaml b/.combo.yaml new file mode 100644 index 0000000..de47ac1 --- /dev/null +++ b/.combo.yaml @@ -0,0 +1,5 @@ +godot: + version: '4.1.2' +game: + name: Greeter + version: '0.1.1' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab79bb3..8250dd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,8 @@ on: push: branches: [4.x] tags: ['*'] + pull_request: + branches: [4.x] workflow_dispatch: env: @@ -34,20 +36,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Versions Vars - run: | - echo "game_version=$(cat .version)" >> $GITHUB_ENV - echo "godot_version=$(cat .godot_version)" >> $GITHUB_ENV - - - name: Set up Python - uses: actions/setup-python@v4 + - uses: MechanicalFlower/magic_combo@main with: - python-version: '3.10' + command: script.add-config-to-github-env - - name: Bump Version - run: | - pip install magic-combo==0.1.1 - bump_version --version-file .version --cfg-file export_presets.cfg + - uses: MechanicalFlower/magic_combo@main + with: + command: script.bump-version - name: Ensure version is equal to tag if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/lint_pr_title.yml b/.github/workflows/lint_pr_title.yml index 1dbe940..405408f 100644 --- a/.github/workflows/lint_pr_title.yml +++ b/.github/workflows/lint_pr_title.yml @@ -20,9 +20,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: scopes: | - playbook + addons + assets scripts - tasks + scenes dependabot workflows readme diff --git a/.godot_version b/.godot_version deleted file mode 100644 index 627a3f4..0000000 --- a/.godot_version +++ /dev/null @@ -1 +0,0 @@ -4.1.1 diff --git a/.version b/.version deleted file mode 100644 index 6e8bf73..0000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 55c4cd5..2f32807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,5 +9,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed ### Security ### Dependencies +- Bump `magic_combo` from 0.1 to 0.2 ([#4](https:/github.com/MechanicalFlower/godot-template/pull/4)) [Unreleased]: https://github.com/MechanicalFlower/godot-template/compare/0.1.0...HEAD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a55f0d7..a9750b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,18 @@ # Contributing -We welcome contributions to our open source Godot game project! There are many ways you can help, including reporting bugs, improving documentation, and contributing code. +We welcome contributions to our open source Godot + game project! There are many ways you can help, + including reporting bugs, improving documentation, + and contributing code. ## Code of Conduct -We value the participation of every member of our community and want to ensure that everyone has an enjoyable and fulfilling experience. As such, we have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as our code of conduct. By participating in this project, you agree to abide by its terms. - -## Prerequisites - -Before you start, you will need the following: - -- A GitHub account -- A copy of the Godot game engine installed on your computer -- Familiarity with Git and GitHub +We value the participation of every member of our + community and want to ensure that everyone + has an enjoyable and fulfilling experience. As + such, we have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as + our code of conduct. By participating in this + project, you agree to abide by its terms. ## Contributing Code @@ -25,34 +25,38 @@ To contribute code to the project, follow these steps: 5. Push your changes to your forked repository on GitHub. 6. Create a pull request from your forked repository to the original repository. -Please note that all code contributions should pass the continuous integration (CI) checks that are set up for the project. These checks ensure that the code is well-formatted and that tests are passing. - -## Pre-commit Requirements - -To ensure that your code passes the CI checks, you should run the following pre-commit checks before committing and pushing your changes: - -- Run the code formatter to ensure that your code is properly formatted according to the project's style guidelines. -- Run the test suite to ensure that all tests are passing. - -You can set up pre-commit hooks to automatically run these checks before you commit your changes. To do this, you will need to install the following tools: - -- The `pre-commit` Python package: This package contains a set of tools for running checks on your code before committing it. You can install it using `pip install pre-commit`. -- The `godot-gdscript-toolkit`: This toolkit contains a set of tools for formatting and linting GDScript code. You can install it using `pip install 'gdtoolkit==4.*'`. - -Then, run `pre-commit install` to set up the hooks. +Please note that all code contributions should + pass the continuous integration (CI) checks + that are set up for the project. These checks + ensure that the code is well-formatted and + that tests are passing. -Alternatively, you can run `pre-commit run --all-files` to manually run all the checks on your code before committing. This can save you time and ensure that your code is ready to be merged into the main repository. ## Reporting Bugs -If you find a bug in the project, please report it by creating an issue in the repository's issue tracker. Be sure to include as much information as possible, including the steps to reproduce the bug and any relevant error messages. +If you find a bug in the project, please report + it by creating an issue in the repository's issue + tracker. Be sure to include as much information + as possible, including the steps to reproduce + the bug and any relevant error messages. ## Improving Documentation -If you would like to improve the documentation for the project, you can do so by submitting a pull request with your changes. Please follow the same process as for contributing code, and make sure that your changes are properly formatted and well-written. +If you would like to improve the documentation + for the project, you can do so by submitting a + pull request with your changes. Please follow + the same process as for contributing code, and + make sure that your changes are properly formatted + and well-written. ## Questions and Feedback -If you have any questions or feedback about the project, don't hesitate to reach out! You can create an issue in the repository's issue tracker, or contact us directly through our website or social media channels. +If you have any questions or feedback about the + project, don't hesitate to reach out! You can + create an issue in the repository's issue tracker, + or contact us directly through our website or + social media channels. -Thank you for considering contributing to our open source Godot game project! We appreciate your help and look forward to working with you. +Thank you for considering contributing to our + open source Godot game project! We appreciate + your help and look forward to working with you. diff --git a/Makefile b/Makefile deleted file mode 100644 index 98a980d..0000000 --- a/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -############# -# Variables # -############# - -GODOT_VERSION := $(shell cat .godot_version) -RELEASE_NAME = stable -SUBDIR = -GODOT_PLATFORM = linux.x86_64 -GODOT_FILENAME = Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM} -GODOT_TEMPLATE = Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz - -GAME_NAME = Greeter -GAME_VERSION := $(shell cat .version) - -############# -# Commands # -############# - -mkflower: - mkdir -p .mkflower - mkdir -p .mkflower/build - mkdir -p .mkflower/bin - mkdir -p .mkflower/cache - - touch .mkflower/.gitignore - echo '*' >> .mkflower/.gitignore - - touch .mkflower/.gdignore - -install_godot: mkflower - curl -X GET "https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/${GODOT_FILENAME}.zip" --output .mkflower/cache/${GODOT_FILENAME}.zip; \ - unzip .mkflower/cache/${GODOT_FILENAME}.zip -d .mkflower/cache/; \ - cp .mkflower/cache/${GODOT_FILENAME} .mkflower/bin/${GODOT_FILENAME}; - -install_templates: mkflower - curl -X GET "https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/${GODOT_TEMPLATE}" --output .mkflower/cache/${GODOT_TEMPLATE}; \ - unzip .mkflower/cache/${GODOT_TEMPLATE} -d .mkflower/cache/; \ - mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME}; \ - cp .mkflower/cache/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME}; - -install_addons: - .mkflower/bin/${GODOT_FILENAME} --headless --script plug.gd install || true - -import_resources: - .mkflower/bin/${GODOT_FILENAME} --headless --export-pack null /dev/null - # timeout 60 .mkflower/bin/${GODOT_FILENAME} --editor || true - # .mkflower/bin/${GODOT_FILENAME} --headless --quit --editor - -export_release_linux: - mkdir -p .mkflower/build/linux - .mkflower/bin/${GODOT_FILENAME} --export-release "Linux/X11" --headless .mkflower/build/linux/${GAME_NAME}.x86_64 - (cd .mkflower/build/linux && zip ${GAME_NAME}-linux-v${GAME_VERSION}.zip -r .) - mv .mkflower/build/linux/${GAME_NAME}-linux-v${GAME_VERSION}.zip .mkflower/build/${GAME_NAME}-linux-v${GAME_VERSION}.zip - -export_release_windows: - mkdir -p .mkflower/build/windows - .mkflower/bin/${GODOT_FILENAME} --export-release "Windows Desktop" --headless .mkflower/build/windows/${GAME_NAME}.exe - (cd .mkflower/build/windows && zip ${GAME_NAME}-windows-v${GAME_VERSION}.zip -r .) - mv .mkflower/build/windows/${GAME_NAME}-windows-v${GAME_VERSION}.zip .mkflower/build/${GAME_NAME}-windows-v${GAME_VERSION}.zip - -export_release_mac: - .mkflower/bin/${GODOT_FILENAME} --export-release "macOS" --headless .mkflower/build/${GAME_NAME}-mac-v${GAME_VERSION}.zip - -editor: - .mkflower/bin/${GODOT_FILENAME} --editor - -godot: - .mkflower/bin/${GODOT_FILENAME} $(ARGS) - -run_release: - .mkflower/build/linux/${GAME_NAME}.x86_64 - -clean_mkflower: - rm -rf .mkflower - -clean_godot: - rm -rf .godot - -clean_plug: - rm -rf .plugged - find addons/ -type d -not -name 'addons' -not -name 'gd-plug' -exec rm -rf {} \; || true - -############# -# Playbook # -############# - -clean: clean_mkflower clean_godot clean_plug -build: clean_godot clean_plug install_addons import_resources export_release_linux -run: build run_release - -export_release_all: export_release_linux export_release_mac export_release_windows -ci_build: clean install_godot install_templates install_addons import_resources export_release_all diff --git a/README.md b/README.md index e25b71b..a90967a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,10 @@ # 📝 Greeter -![Godot Badge](https://img.shields.io/badge/godot-4.0-blue?logo=Godot-Engine&logoColor=white) ![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white) ![license](https://img.shields.io/badge/license-MIT-green?logo=open-source-initiative&logoColor=white) ![reuse](./.reuse/REUSE-compliant.svg) +![Godot Badge](https://img.shields.io/badge/godot-4.1-blue?logo=Godot-Engine&logoColor=white) +![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white) +![license](https://img.shields.io/badge/license-MIT-green?logo=open-source-initiative&logoColor=white) +![reuse](./.reuse/REUSE-compliant.svg) A template to create new [Godot Engine](https://godotengine.org/) project. @@ -31,6 +34,8 @@ Feel free to replace the License with one suited for your project. ## Contributing +![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg) + We welcome community contributions to this project. Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.