tools for exporting godot projects via Github Actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: "export"
on:
  workflow_call:
    inputs:
      godot-version:
        default: 3.5
        required: true
        type: number
      image:
        default: ghcr.io/bend-n/godot-2d:3.5
        type: string
        required: true
      export-name:
        default: ${{ github.event.repository.name }}
        required: true
        type: string
      platforms: # space seperated platform list
        default: "windows linux web android mac"
        required: true
        type: string
      project-root-path: # the root folder, relative to your repo, or an absolute path.
        default: "."
        required: false
        type: string
    secrets:
      android-keystore-base64: # will be filled with andrid debug keystore if left blank
        required: false
      android-keystore-password:
        required: false
      butler-api-key:
        required: false

env:
  GODOT_VERSION: ${{ inputs.godot-version }}
  PROJECT_PATH: ${{ inputs.project-root-path }}
  NAME: ${{ inputs.export-name }}

jobs:
  linux:
    runs-on: ubuntu-latest
    if: contains(${{ inputs.platforms }}, ${{ github.job }})
    container:
      image: ${{ inputs.image }}
    name: Linux
    steps:
      - name: Build
        uses: bend-n/godot-actions/.github/actions/export-linux@main

  windows:
    runs-on: ubuntu-latest
    if: contains(${{ inputs.platforms }}, ${{ github.job }})
    container:
      image: ${{ inputs.image }}
    name: Windows
    steps:
      - name: Build
        uses: bend-n/godot-actions/.github/actions/export-windows@main

  mac:
    runs-on: ubuntu-latest
    if: contains(${{ inputs.platforms }}, ${{ github.job }})
    container:
      image: ${{ inputs.image }}
    name: macOS
    steps:
      - name: Build
        uses: bend-n/godot-actions/.github/actions/export-mac@main

  web:
    runs-on: ubuntu-latest
    if: contains(${{ inputs.platforms }}, ${{ github.job }})
    container:
      image: ${{ inputs.image }}
    name: HTML5
    steps:
      - name: Build
        uses: bend-n/godot-actions/.github/actions/export-web@main

  android:
    runs-on: ubuntu-latest
    if: contains(${{ inputs.platforms }}, ${{ github.job }})
    container:
      image: ${{ inputs.image }}
    name: Android
    steps:
      - name: Build
        uses: bend-n/godot-actions/.github/actions/export-android@main
        with:
          android-keystore-base64: ${{ secrets.android-keystore-base64 }}
          android-password: ${{ secrets.android-keystore-password }}

  push-itch:
    needs: [linux, android, windows, mac, web]
    name: Push to itch.io
    runs-on: ubuntu-20.04
    steps:
      - name: Check for api key
        id: secret
        run: echo '::set-output name=secret::${{ secrets.butler-api-key }}'

      - name: Push
        if: steps.secret.outputs.secret
        uses: bend-n/godot-actions/.github/actions/itch-push@main
        with:
          api-key: ${{ secrets.butler-api-key }}