This template contains 2 workflows:
main.yml
- This workflow is triggered on pull requests to themain
,master
ordevelop
branches OR on pushes tomain
,master
ordevelop
branches.release.yml
- This workflow is triggered on pushes tomain
ormaster
branches.
For the workflows to run, you need to configure some secrets in your repository settings as well as make some string replacements in the workflow files.
In release.yml
, you need to inspect the environment variable definitions and insert your own values for Godot Asset Lib and Itch.io, respectively.
In both main.yml
and release.yml
, you need to replace, just with the rest of this template repository, replace all occurrences of ADDON_NAME
with the name of your addon! Please make sure there are no spaces, and only alphanumeric values, dashes and underscores in this sting!.
Because we're committing back from the workflow to the repo, you need to provide a "Personal Access Token" or "PAT" to the workflow. This is a token that allows the workflow to commit back to the repo. You can create a PAT in your GitHub settings. See the documentation.
This PAT needs to have the repo
scope.
Once you have created this PAT, you need to add it to the repository secrets as PAT
.
GITHUB_TOKEN
does not allow commits back to the same repo for security reasons. Hence, we need this specific PAT to allow committing back.
If you want to publish to the Godot Asset Library, you need to add the following secrets to your repository:
ASSET_LIB_PASSWORD
- The password for your Godot Asset Library account
If you want to publish to Itch.io, you need to add the following secrets to your repository:
ITCHIO_SECRET
- This is the secret key for your Itch.io page. You can find it in your addon's settings on Itch.io.
There are more options to this. Please check out the respective action's documentation.
This is the main workflow that runs on pull requests and pushes to the main
, master
or develop
branches. It just does a shallow git checkout (the latest revision) and runs GUT tests.
This workflow is triggered on pushes to main
or master
branches. It does a full git checkout (all revisions).
It is self-recursive!
In the first run, it will run the prerelease
job, which will determine if and how to bump the version.
If there is a version bump determined, it will
- generate and update
CHANGELOG.md
(or create it, if it does not exist) - update
plugin.cfg
with the new version - Commit the changes back to the branch
On the second run, it will skip the prerelease
job and run the release
job instead.
This will:
- Tag the release commit
- Upload a release artifact for later use
- Create a GitHub release, with the changelog as the release notes
Once the release job was run, the workflow will then run two other jobs to publish to Itch.io and the Godot Asset Library.
release.yml
will automatically determine if and how to bump the version using the Git Hub Action mathieudutour/github-tag-action
. It will do this by looking at the commit messages of the commits that are on the branch.
If you look closely, release.yml
defines the keywords that are used to determine the version bump with the custom_release_rules
, but these are in addition to the default Angular Commit Message Convention (see below). The pattern is always:
<keyword>:<release type>:<changelog_section>
where release_type
is one of major
, minor
or patch
and changelog_section
is a free-form string, which defines a header in the CHANGELOG.md
. If left empty, it defaults to the Angular defaults. See Angular Commit Message Convention for more info
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
perf: pooled HTTP connections
BREAKING CHANGE: Removed legacy ClientAPI