Coder Social home page Coder Social logo

yagi's Introduction

Yet Another Godot Image

Image aimed to be used in Github actions for building Godot projects.

Developing

docker build -t aristarhys/yagi:latest -t aristarhys/yagi:4.2.1 --squash=true .
docker push --all-tags aristarhys/yagi

Example action

name: Build published release
on:
  release:
    types: [published]
jobs:
  release:
    name: "Publish platform release"
    runs-on: ubuntu-latest
    container:
      image: aristarhys/yagi:latest
    strategy:
      max-parallel: 3
      matrix:
        platform: ["linux", "windows", "mac"]
        include:
          - platform: "linux"
            out_ext: "x86_64"
          - platform: "windows"
            out_ext: "exe"
          - platform: "mac"
            out_ext: "zip"
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: true
          fetch-depth: 0

      - name: Build release
        working-directory: $GITHUB_WORKSPACE
        env:
          BUILD_PLATFORM: ${{ matrix.platform }}
          BUILD_EXT: ${{ matrix.out_ext }}
        run: |
          mkdir -p /releases
          godot --export $BUILD_PLATFORM /releases/$BUILD_PLATFORM.$BUILD_EXT

      - name: Upload release to assets
        uses: actions/upload-artifact@v4
        with:
          name: ${{ matrix.platform }}-release
          path: /releases/${{ matrix.platform }}.${{ matrix.out_ext }}

      - name: Upload release to published tag
        uses: svenstaro/upload-release-action@v2
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          file: /releases/${{ matrix.platform }}.${{ matrix.out_ext }}
          asset_name: ${{ matrix.platform }}-$tag.${{ matrix.out_ext }}
          tag: ${{ github.ref }}

Example static check action

Using gdscript toolkit

name: Check pushed code
on:
  push:
    branches:
      - main
    release:
      types:
        - created
  pull_request:
    branches:
      - main
jobs:
  check:
    runs-on: ubuntu-latest
    name: "Check pushed code"
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: true
          fetch-depth: 0
      - name: "Install gd script toolkit"
        uses: Scony/godot-gdscript-toolkit@master
      - name: "Check lint"
        run: gdlint .
      - name: "Check formatting"
        run: gdformat --check .

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.