Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: upgrade workflow from godot-template
Browse files Browse the repository at this point in the history
florianvazelle committed Oct 24, 2023
1 parent 7f3d1dc commit 2dd4041
Showing 19 changed files with 210 additions and 256 deletions.
5 changes: 5 additions & 0 deletions .combo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
godot:
version: '4.1.2'
game:
name: Marble
version: '1.4.1'
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -4,11 +4,16 @@ on:
push:
branches: [main]
tags: ['*']
pull_request:
branches: [main]
workflow_dispatch:

env:
tag_name: ${{ github.ref_name }}

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
timeout-minutes: 30

strategy:
@@ -31,16 +36,18 @@ 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
./bump_version.sh
- uses: MechanicalFlower/magic_combo@main
with:
command: script.add-config-to-github-env

- uses: MechanicalFlower/magic_combo@main
with:
command: script.bump-version

- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/')
run: |
[ "${{ env.game_version }}" == "$GITHUB_REF_NAME" ] || exit 2
[ "${{ env.game_version }}" == "${{ env.tag_name }}" ] || exit 2
- name: Export Marble
uses: ./.github/actions/export-game
@@ -68,5 +75,5 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: build/web # The folder the action should deploy.
branch: gh-pages
folder: build/web
15 changes: 15 additions & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Changelog Verifier

on:
pull_request:
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
30 changes: 30 additions & 0 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dependabot PR actions

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
dependabot:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write

if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Update the changelog
uses: dangoslen/dependabot-changelog-helper@v3
with:
version: 'Unreleased'

- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(changelog): automatic update to add dependabot deps bump"
branch: ${{ github.head_ref }}
commit_user_name: dependabot[bot]
commit_user_email: [email protected]
20 changes: 20 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Link Checker
on:
push:
pull_request:

jobs:
linkchecker:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
with:
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "file:///github/workspace/*" --exclude-path ".github/renovate.json" --exclude-mail
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
34 changes: 34 additions & 0 deletions .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scopes: |
addons
assets
scripts
scenes
dependabot
workflows
readme
changelog
deps
requireScope: false
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
4 changes: 1 addition & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Pre-commit

on:
@@ -10,8 +9,7 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
40 changes: 25 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,9 @@ on:
workflow_run:
workflows: ["Build"]
types: [completed]
tags: ['[0-9]+.[0-9]+.[0-9]+']

env:
tag_name: ${{ github.event.workflow_run.head_branch }}

jobs:
create_release:
@@ -14,18 +16,24 @@ jobs:

name: Create Release
steps:
- name: Check Tag
run: |
if [[ ! ${{ env.tag_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
exit 1
fi
- name: Create Draft release
run: |
gh release create "$GITHUB_REF_NAME" \
--repo="$GITHUB_REPOSITORY" \
--title="v$GITHUB_REF_NAME" \
gh release create "${{ env.tag_name }}" \
--repo="${{ github.repository }}" \
--title="v${{ env.tag_name }}" \
--draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: create_release
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

strategy:
fail-fast: false
@@ -46,26 +54,28 @@ jobs:
name: ${{ matrix.preset }} Publish
steps:
- name: Download artifact
uses: ./.github/actions/upload-artifact
uses: dawidd6/action-download-artifact@v2
with:
name: Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME
workflow: ${{ github.event.workflow_run.workflow_id }}
name: Greeter-${{ matrix.platform }}-v${{ env.tag_name }}
path: dist/${{ matrix.platform }}
skip_unpack: true

- name: Upload to release
run: |
gh release upload "$GITHUB_REF_NAME" \
--repo="$GITHUB_REPOSITORY" \
--clobber \
dist/${{ matrix.platform }}/Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME.zip
gh release upload "${{ env.tag_name }}" \
--repo="${{ github.repository }}" \
--clobber \
dist/${{ matrix.platform }}/Greeter-${{ matrix.platform }}-v${{ env.tag_name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload to itch.io
uses: josephbmanley/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }}
CHANNEL: ${{ matrix.platform }}-v$GITHUB_REF_NAME
ITCH_GAME: marble
CHANNEL: ${{ matrix.platform }}
ITCH_GAME: greeter
ITCH_USER: mechanical-flower
PACKAGE: dist/${{ matrix.platform }}/Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME.zip
VERSION: $GITHUB_REF_NAME
PACKAGE: dist/${{ matrix.platform }}/Greeter-${{ matrix.platform }}-v${{ env.tag_name }}.zip
VERSION: ${{ env.tag_name }}
1 change: 0 additions & 1 deletion .godot_version

This file was deleted.

23 changes: 4 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -13,30 +13,14 @@ repos:
- id: end-of-file-fixer # Checks for ending with a newline
- id: mixed-line-ending # Consistent LF or CRLF
- id: trailing-whitespace # No trailing whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
- repo: https://github.com/fsfe/reuse-tool
rev: v2.0.0
hooks:
- id: reuse
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: mypy
- id: codespell
- repo: local
hooks:
- id: lower-case-only
@@ -51,6 +35,7 @@ repos:
public/|
Makefile|
CONTRIBUTING.md|
CHANGELOG.md|
CREDITS.md|
LICENSE.md|
README.md
5 changes: 0 additions & 5 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -55,11 +55,6 @@ Copyright: 2011 Destructavator
License: CC-BY-3.0
Source: https://opengameart.org/content/countdown

Files: assets/sounds/countdown/*
Copyright: 2011 Destructavator
License: CC-BY-3.0
Source: https://opengameart.org/content/countdown

Files: assets/sounds/sfx/*
Copyright: 2019 Zylann
License: CC-BY-NC-ND-1.0
1 change: 0 additions & 1 deletion .version

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CHANGELOG
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
### Dependencies

[Unreleased]: https://github.com/MechanicalFlower/Marble/compare/1.4.1...HEAD
65 changes: 34 additions & 31 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +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

@@ -26,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==3.*'`.

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.
8 changes: 7 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,12 @@
- "[assets/blocks/*](https://github.com/Zylann/marbles)" by **Zylann** licensed under [MIT](https://spdx.org/licenses/MIT.html)
## Textures
- "[assets/icons/*](https://icons8.com/)" by **Icons8** licensed under [LicenseRef-linksware](https://spdx.org/licenses/LicenseRef-linksware.html)
- "[assets/marble/*](https://ambientcg.com/view?id=Ground037)" by **Lennart Demes** licensed under [CC0-1.0](https://spdx.org/licenses/CC0-1.0.html)
- "[assets/textures/marble/*](https://ambientcg.com/view?id=Ground037)" by **Lennart Demes** licensed under [CC0-1.0](https://spdx.org/licenses/CC0-1.0.html)
- "[assets/textures/wood.jpg](https://github.com/Zylann/marbles)" by **Zylann** licensed under [MIT](https://spdx.org/licenses/MIT.html)
## Sounds
- "[assets/sounds/countdown/*](https://opengameart.org/content/countdown)" by **Destructavator** licensed under [CC-BY-3.0](https://spdx.org/licenses/CC-BY-3.0.html)
- "[assets/sounds/sfx/*](https://github.com/Zylann/marbles)" by **Zylann** licensed under [CC-BY-NC-ND-1.0](https://spdx.org/licenses/CC-BY-NC-ND-1.0.html)
## Fonts
- "[assets/fonts/box_pixies.ttf](https://www.fontspace.com/boxpixies-font-f27657)" by **Heaven Castro** licensed under [CC0-1.0](https://spdx.org/licenses/CC0-1.0.html)
## Shaders
- "[shaders/sky.gdshader](https://godotshaders.com/shader/stylized-sky-with-procedural-sun-and-moon/)" by **krzmig** licensed under [MIT](https://spdx.org/licenses/MIT.html)
95 changes: 0 additions & 95 deletions Makefile

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,9 @@

# ⚽ Marble

![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)
![Godot Badge](https://img.shields.io/badge/godot-4.1-blue?logo=Godot-Engine&logoColor=white)
![license](https://img.shields.io/badge/license-MIT-green?logo=open-source-initiative&logoColor=white)
![reuse](./.reuse/REUSE-compliant.svg)

A marble race minigame, made with [Godot Engine](https://godotengine.org/).

@@ -44,6 +46,8 @@ The race is infinite, and the game ends when only one marble remains.

## 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.
12 changes: 0 additions & 12 deletions bump_version.sh

This file was deleted.

62 changes: 0 additions & 62 deletions generate_credits.py

This file was deleted.

0 comments on commit 2dd4041

Please sign in to comment.