Coder Social home page Coder Social logo

loteque / godot-project-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 812 KB

Template to bootstrap a Godot 3 LTS Project with github-ci, git-lfs (optional), GUT test framework, and some default configurations.

License: MIT License

GDScript 100.00%
game-development gamedev godot godot-engine godot-template starter-project godot3

godot-project-template's Introduction

godot-project-template

Template Usage

Features:

  • GitHub pages auto-deploy
  • itch.io auto-delivery
  • best practices dir stucture
  • Optional
    • git-LFS
    • GUT (Godot Unit Testing)

itch.io and GitHub pages auto deploy step by step

Sign in to GitHub and Itch.io:
  1. Make sure you are signed in to both github and itch.io
Create a GitHub Personal Access Token for the project:
  1. Create a Personal Access Token, in your GitHub user account settings, with the following permissions:
    • Contents - Read and Write
    • Metadata - Read-only
    • Pages - Read and Write image
Add personal access token to repo secrets:
  1. add Personal Acess Token as a repository secret with name GH_CREDENTIALS
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/settings/secrets/actions image
Set the read and write permissions for the workflow:
  1. Make sure read and write permissions are set on workflows:
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/settings/actions image
Setup GitHub Pages:
  1. Setup pages for the repository:
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/settings/pages image
Customize the workflow yaml to your project:
  1. Edit the .github/workflows/godot-ci.yml file:
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/blob/main/.github/workflows/godot-ci.yml
    name: "godot-ci export"
    on: 
      push:
        tags:
          - "v*"
    
    env:
    ๐Ÿ‘‰  GODOT_VERSION: X.x    #your-godot-version probably "3.5"
    ๐Ÿ‘‰  EXPORT_NAME: string   #the-name-of-your-project
    • After the godot-ci workflow completes you will find your game at .github.io/
Create a butler API token:
Add Token to repo Secrets:
  • add the token to yout repository secrets with name BUTLER_CREDENTIALS
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/settings/secrets/actions image
Customize the deploy yaml to your project:
  • Edit .github/workflows/publish-to-itchio.yml
    • ๐Ÿ‘‰ https://github.com/<your-github-username>/<your-repository-name>/blob/main/.github/workflows/publish-to-itchio.yml
    name: "publish to itch.io"
    on:
      release:
      types: [published]
    
    env:
    ๐Ÿ‘‰  ITCH_USER: your_itchio_username       #<your-user-name>.itch.io
    ๐Ÿ‘‰  ITCH_GAME: the_url_stub_of_your_game  #<your-user-name>.itch.io/<the-url-stub>
    

Triggering the auto-deploy pipeline

GitHub actions will trigger an autodeploy process when it detects a tag starting with "v", For Example: v1.0.1

Commit as normal, push it, tag your commit, then push the tag:
  • Commit your changes as normal, then tag the commit: git tag -a v1.0 -m "summary of release changes"
  • Push your changes with the tag: git push origin --tags
  • Github Actions will detect the new tag and trigger a new automated build of the game.
  • When it is done building it will auto-deploy an HTML5 Version to Github Pages.
  • It will release all versions you have configured to build to Itch.io.

GUT and git-LFS

Optionally configure Godot Unit Testing (GUT) and/or git-LFS

git-LFS(optional):

Before you push your first changes make sure you have git-lfs installed on your system: https://git-lfs.github.com/ this template comes with a preconfigured .gitattributes file but feel free to add your own rules. you must change the filename from gitattributes-template to .gitattributes

GUT(optional):

Godot Unit Tests (GUT) is configured by default to run on pull requests to main. Tests are to be placed in res://test in either the res://test/unit or res://test/integration dirs. If you don't want to use tests just don't place tests there. For more information on GUT: https://github.com/bitwes/Gut/wiki/Quick-Start


Directory structure and best practices

  • the project/asset directory is where you keep all your game art, sound, etc... It can be tracked by git-lfs
  • the project/src directory is where you keep the source-code. It should not be tracked by git-lfs.

YOUR PROJECT DESCRIPTION

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec diam enim. Aenean quis hendrerit elit. Fusce nec lectus laoreet, convallis neque quis, venenatis est. Curabitur sapien lorem, accumsan ut est id, tempor tristique massa. Etiam bibendum sapien urna, ut pretium mi sagittis nec. Sed aliquam nec lorem quis scelerisque. Sed vel mi sem. Pellentesque aliquet urna vitae orci vulputate viverra sed id ipsum. Mauris gravida sapien quis tellus semper, eget viverra nulla tincidunt. Ut nec rhoncus ligula, vitae varius odio. Integer malesuada nisi vitae dolor iaculis interdum. Donec maximus vehicula metus, at condimentum ante pellentesque vel. Praesent dignissim dui ut magna faucibus maximus. Sed pellentesque eu mauris eu posuere.

Nunc sit amet sodales sem. Vivamus consequat ipsum sapien, vitae feugiat erat maximus et. Integer magna massa, commodo eget odio non, venenatis suscipit nibh. Sed et lorem varius, vestibulum libero a, lacinia risus. Fusce lacinia orci lacus, malesuada consectetur nisi suscipit et. Sed non elit vel ipsum malesuada suscipit. Nunc sit amet euismod eros, vel rhoncus odio. Nam pharetra maximus dolor sed viverra. Vestibulum sollicitudin sollicitudin magna, ut placerat nulla imperdiet at. Aenean dui risus, mollis tincidunt tincidunt non, facilisis ut velit. In velit ipsum, pulvinar ut malesuada vel, fermentum at dolor. Suspendisse potenti. Cras posuere, libero vitae mattis pharetra, erat orci elementum diam, vel ornare leo turpis vitae dolor. Suspendisse potenti. Ut lobortis eu felis at pretium. Aliquam convallis blandit magna.

Aliquam venenatis tincidunt ante, quis tincidunt quam posuere sed. Nam vulputate nunc lectus, nec pellentesque lacus sodales vel. Proin ante metus, vehicula sed metus id, blandit pulvinar leo. Nam a turpis sit amet enim congue malesuada et quis nisi. Integer consectetur tempor mauris at euismod. Etiam volutpat lectus gravida nibh tristique egestas. Morbi vitae aliquam est.

Vestibulum sed arcu a nisi commodo posuere bibendum eu arcu. Ut tincidunt massa a erat venenatis mollis. Donec ut orci ut ligula commodo rhoncus a sit amet augue. Cras ultrices interdum quam, sed gravida lectus feugiat a. Proin elementum felis ac eleifend egestas. Suspendisse ac lacus vitae nulla ornare lacinia. Suspendisse convallis, mi at dictum vehicula, mauris lacus vulputate felis, id pharetra velit turpis in diam. Nullam porttitor dui eu tortor elementum, quis ultricies magna finibus. Suspendisse vel vulputate urna. Fusce vitae dolor quis risus ultrices ultricies ac et velit.

Pellentesque ullamcorper massa eget sagittis tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed dui non ante sollicitudin pretium. Aliquam et eleifend massa, non aliquam dui. Maecenas aliquam aliquet faucibus. Integer et mi non augue iaculis maximus sit amet at lacus. Pellentesque sit amet leo hendrerit, lacinia massa eu, molestie sem. Aenean commodo arcu a justo pulvinar ultricies. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Aliquam non tortor augue. Cras nec lacus porta, finibus elit ac, imperdiet velit. Nunc cursus molestie tempus. Nulla dapibus aliquet vestibulum. Aliquam a dictum velit, at pellentesque tortor.

godot-project-template's People

Contributors

loteque avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

boyquotes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.