From 3e18735be5d95370f0927923214496fad297759d Mon Sep 17 00:00:00 2001 From: BARICHELLO Date: Sun, 26 Apr 2020 15:56:29 -0300 Subject: [PATCH] Update README with GH Actions --- README.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 4ca5146..ff0a21b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # godot-ci -Docker image to export Godot Engine games and deploy to GitLab/GitHub Pages and Itch.io. +Docker image to export Godot Engine games and deploy to GitLab/GitHub Pages and Itch.io using GitLab CI and GitHub Actions. @@ -8,42 +8,50 @@ https://hub.docker.com/r/barichello/godot-ci/ ## How To Use -A `.gitlab-ci.yml` is included in this project as reference, for live projects, examples and tutorials using this template check the list below:
+`.gitlab-ci.yml` and `.github/workflows/godot-ci.yml` are included in this project as reference. +
For live projects, examples and tutorials using this template check the list below:
- [Video tutorial by Kyle Luce](https://www.youtube.com/watch?v=wbc1qut0vT4) - Repository examples: [GitHub](https://github.com/aBARICHELLO/game-off) | [GitLab](https://gitlab.com/BARICHELLO/game-off) - Deployed game examples: [GitHub Pages](http://barichello.me/game-off/) | [GitLab Pages](https://barichello.gitlab.io/game-off/) | [Itch.io](https://barichello.itch.io/game-off) -- [Pipelines running](https://gitlab.com/BARICHELLO/game-off/pipelines) - -You can choose either [GitLab Pages](https://gitlab.com/help/user/project/pages/index.md) or [GitHub Pages](https://pages.github.com/) to deploy web exports. +- [GitLab CI Pipelines running](https://gitlab.com/BARICHELLO/game-off/pipelines) +- [GitHub Actions running](https://github.com/aBARICHELLO/game-off/actions) ## Platforms -### GitLab Pages +Here's a mapping between each supported CI service and the template jobs. -Delete the `deploy-github-pages` job from your `.gitlab-ci.yml`. +|CI|Template| +|-|-| +|GitLab CI|[Godot Exports](https://github.com/aBARICHELLO/godot-ci/blob/master/.gitlab-ci.yml#L22-L56) / [GitHub Pages](https://github.com/aBARICHELLO/godot-ci/blob/master/.gitlab-ci.yml#L59-L74) / [GitLab Pages](https://github.com/aBARICHELLO/godot-ci/blob/master/.gitlab-ci.yml#L77-L89) / [Itch.io](https://github.com/aBARICHELLO/godot-ci/blob/master/.gitlab-ci.yml#L91-L111) +|GitHub Actions|[Godot Exports](https://github.com/aBARICHELLO/godot-ci/blob/master/.github/workflows/godot-ci.yml#L9-L87) + +## Environment configuration + +First you need to remove unused jobs/stages from the `.yml` file you are using as a template(`.gitlab-ci.yml` or `.github/workflows/godot-ci.yml`).
+Then you have to add these environments to a configuration panel depending on the chosen CI and jobs: +- **GitHub**: `https://github.com///settings/secrets` +- **GitLab**: `https://gitlab.com///settings/ci_cd` ### GitHub Pages -Delete the `pages` job and set the following **Variables** in the GitLab CI/CD panel: - -*Access `https://gitlab.com///settings/ci_cd` to edit:* +Secrets needed for a GitHub Pages deploy via GitLab CI: |Variable|Description|Example| |-|-|-| -| $REMOTE_URL | The `git remote` where the web export will be hosted (in this case GitHub), it should contain your [deploy/personal access token](https://github.com/settings/tokens)|`https://:@github.com//.git` -| $GIT_EMAIL | Git email of the account that will commit to the `gh-pages` branch. | `artur@barichello.me` -| $GIT_USERNAME | Username of the account that will commit to the `gh-pages` branch. | `abarichello` +| REMOTE_URL | The `git remote` where the web export will be hosted (in this case GitHub), it should contain your [deploy/personal access token](https://github.com/settings/tokens)|`https://:@github.com//.git` +| GIT_EMAIL | Git email of the account that will commit to the `gh-pages` branch. | `artur@barichello.me` +| GIT_USERNAME | Username of the account that will commit to the `gh-pages` branch. | `abarichello` Others variables are set automatically by the `gitlab-runner`, see the documentation for [predefined variables](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html).
### Itch.io -Deployment to Itch.io is done via [Butler](https://itch.io/docs/butler/). -You will need to set variables in the Gitlab CI/CD settings panel for it to work. +Deployment to Itch.io is done via [Butler](https://itch.io/docs/butler/).
+Secrets needed for a Itch.io deploy via GitLab CI: |Variable|Description|Example| |-|-|-| -| $ITCHIO_USERNAME | Your username on Itch.io, as in your personal page will be at `https://.itch.io` |`username` -| $ITCHIO_GAME | the name of your game on Itchio, as in your game will be available at `https://.itch.io/` |`game` -| $BUTLER_API_KEY | An [Itch.io API key](https://itch.io/user/settings/api-keys) is necessary for Butler so that Gitlab-ci can authenticate on Itch.io on your behalf. **Make that API key `Masked` to keep it secret** |`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` +| ITCHIO_USERNAME | Your username on Itch.io, as in your personal page will be at `https://.itch.io` |`username` +| ITCHIO_GAME | the name of your game on Itchio, as in your game will be available at `https://.itch.io/` |`game` +| BUTLER_API_KEY | An [Itch.io API key](https://itch.io/user/settings/api-keys) is necessary for Butler so that the CI can authenticate on Itch.io on your behalf. **Make that API key `Masked`(GitLab CI) to keep it secret** |`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`