|
5 | 5 | branches: [main] |
6 | 6 | workflow_dispatch: |
7 | 7 |
|
8 | | -env: |
9 | | - GODOT_VERSION: 3.5 |
10 | | - EXPORT_NAME: RootedShadow |
11 | | - ITCH_IO: ${{ false }} # Set to true if you want to enable automatic itch.io deploy |
12 | | - |
13 | 8 | jobs: |
14 | | - export-windows: |
15 | | - name: Windows Export |
| 9 | + release-packaging: |
16 | 10 | runs-on: ubuntu-20.04 |
17 | | - container: |
18 | | - image: barichello/godot-ci:3.5 |
19 | | - steps: |
20 | | - - name: Checkout |
21 | | - uses: actions/checkout@v3 |
22 | | - - name: Setup |
23 | | - run: | |
24 | | - mkdir -v -p ~/.local/share/godot/templates |
25 | | - mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable |
26 | | - - name: Windows Build |
27 | | - run: | |
28 | | - mkdir -v -p build/windows |
29 | | - godot -v --export "Windows Desktop" ./build/windows/$EXPORT_NAME.exe |
30 | | - - name: Upload Artifact |
31 | | - uses: actions/upload-artifact@v3 |
32 | | - with: |
33 | | - name: windows |
34 | | - path: build/windows |
35 | | - - name: Zip Folder |
36 | | - run: zip -r itch.zip build/windows |
37 | | - - name: Deploy to itch.io |
38 | | - if: ${{ env.ITCH_IO == true }} |
39 | | - uses: josephbmanley/butler-publish-itchio-action@master |
40 | | - env: |
41 | | - BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} |
42 | | - CHANNEL: windows |
43 | | - ITCH_GAME: ${{ secrets.ITCH_GAME }} |
44 | | - ITCH_USER: ${{ secrets.ITCH_USER }} |
45 | | - PACKAGE: itch.zip |
| 11 | + timeout-minutes: 30 |
46 | 12 |
|
47 | | - export-linux: |
48 | | - name: Linux Export |
49 | | - runs-on: ubuntu-20.04 |
50 | | - container: |
51 | | - image: barichello/godot-ci:3.5 |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - platform: windows |
| 18 | + output: RootedShadow.exe |
| 19 | + preset: Windows Desktop |
| 20 | + |
| 21 | + - platform: linux |
| 22 | + output: RootedShadow.x86_64 |
| 23 | + preset: Linux/X11 |
| 24 | + |
| 25 | + - platform: web |
| 26 | + output: index.html |
| 27 | + preset: HTML5 |
| 28 | + |
| 29 | + - platform: mac |
| 30 | + output: RootedShadow.zip |
| 31 | + preset: Mac OSX |
| 32 | + |
| 33 | + name: ${{ matrix.preset }} Export |
52 | 34 | steps: |
53 | | - - name: Checkout |
54 | | - uses: actions/checkout@v3 |
55 | | - - name: Setup |
56 | | - run: | |
57 | | - mkdir -v -p ~/.local/share/godot/templates |
58 | | - mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable |
59 | | - - name: Linux Build |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + |
| 37 | + - name: Setup Versions Vars |
60 | 38 | run: | |
61 | | - mkdir -v -p build/linux |
62 | | - godot -v --export "Linux/X11" ./build/linux/$EXPORT_NAME.x86_64 |
63 | | - - name: Upload Artifact |
64 | | - uses: actions/upload-artifact@v3 |
| 39 | + echo "game_version=$(cat .version)" >> $GITHUB_ENV |
| 40 | + echo "godot_version=$(cat .godot_version)" >> $GITHUB_ENV |
| 41 | + ./bump_version.sh |
| 42 | +
|
| 43 | + - name: Export RootedShadow |
| 44 | + uses: ./.github/actions/export-game |
65 | 45 | with: |
66 | | - name: linux |
67 | | - path: build/linux |
68 | | - - name: Zip Folder |
69 | | - run: zip -r itch.zip build/linux |
70 | | - - name: Deploy to itch.io |
71 | | - if: ${{ env.ITCH_IO == true }} |
72 | | - uses: josephbmanley/butler-publish-itchio-action@master |
73 | | - env: |
74 | | - BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} |
75 | | - CHANNEL: linux |
76 | | - ITCH_GAME: ${{ secrets.ITCH_GAME }} |
77 | | - ITCH_USER: ${{ secrets.ITCH_USER }} |
78 | | - PACKAGE: itch.zip |
| 46 | + platform: ${{ matrix.platform }} |
| 47 | + output: ${{ matrix.output }} |
| 48 | + preset: ${{ matrix.preset }} |
| 49 | + version: ${{ env.game_version }} |
| 50 | + godot_version: ${{ env.godot_version }} |
79 | 51 |
|
80 | | - export-web: |
81 | | - name: Web Export |
82 | | - runs-on: ubuntu-20.04 |
83 | | - container: |
84 | | - image: barichello/godot-ci:3.5 |
85 | | - steps: |
86 | | - - name: Checkout |
87 | | - uses: actions/checkout@v3 |
88 | | - - name: Setup |
89 | | - run: | |
90 | | - mkdir -v -p ~/.local/share/godot/templates |
91 | | - mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable |
92 | | - - name: Web Build |
93 | | - run: | |
94 | | - mkdir -v -p build/web |
95 | | - godot -v --export "HTML5" ./build/web/index.html |
96 | | - - name: Upload Artifact |
97 | | - uses: actions/upload-artifact@v3 |
| 52 | + - name: Upload artifact |
| 53 | + uses: ./.github/actions/upload-artifact |
98 | 54 | with: |
99 | | - name: web |
100 | | - path: build/web |
| 55 | + name: RootedShadow-${{ matrix.platform }}-v${{ env.version }} |
| 56 | + path: build/${{ matrix.platform }} |
| 57 | + |
101 | 58 | # Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail. |
102 | 59 | - name: Install rsync |
| 60 | + if: ${{ matrix.platform == 'web' }} |
103 | 61 | run: | |
104 | 62 | apt-get update && apt-get install -y rsync |
| 63 | +
|
105 | 64 | - name: Deploy to GitHub Pages |
| 65 | + if: ${{ matrix.platform == 'web' }} |
106 | 66 | uses: JamesIves/github-pages-deploy-action@v4 |
107 | 67 | with: |
108 | 68 | token: ${{ secrets.GITHUB_TOKEN }} |
109 | 69 | branch: gh-pages # The branch the action should deploy to. |
110 | 70 | folder: build/web # The folder the action should deploy. |
111 | | - - name: Zip Folder |
112 | | - run: zip -r itch.zip build/web |
113 | | - - name: Deploy to itch.io |
114 | | - if: ${{ env.ITCH_IO == true }} |
115 | | - uses: josephbmanley/butler-publish-itchio-action@master |
116 | | - env: |
117 | | - BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} |
118 | | - CHANNEL: HTML |
119 | | - ITCH_GAME: ${{ secrets.ITCH_GAME }} |
120 | | - ITCH_USER: ${{ secrets.ITCH_USER }} |
121 | | - PACKAGE: itch.zip |
122 | | - |
123 | | - export-mac: |
124 | | - name: Mac Export |
125 | | - runs-on: ubuntu-20.04 |
126 | | - container: |
127 | | - image: barichello/godot-ci:3.5 |
128 | | - steps: |
129 | | - - name: Checkout |
130 | | - uses: actions/checkout@v3 |
131 | | - - name: Setup |
132 | | - run: | |
133 | | - mkdir -v -p ~/.local/share/godot/templates |
134 | | - mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable |
135 | | - - name: Mac Build |
136 | | - run: | |
137 | | - mkdir -v -p build/mac |
138 | | - godot -v --export "Mac OSX" ./build/mac/$EXPORT_NAME.zip |
139 | | - - name: Upload Artifact |
140 | | - uses: actions/upload-artifact@v3 |
141 | | - with: |
142 | | - name: mac |
143 | | - path: build/mac |
144 | | - - name: Zip Folder |
145 | | - run: zip -r itch.zip build/mac |
146 | | - - name: Deploy to itch.io |
147 | | - if: ${{ env.ITCH_IO == true }} |
148 | | - uses: josephbmanley/butler-publish-itchio-action@master |
149 | | - env: |
150 | | - BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} |
151 | | - CHANNEL: mac |
152 | | - ITCH_GAME: ${{ secrets.ITCH_GAME }} |
153 | | - ITCH_USER: ${{ secrets.ITCH_USER }} |
154 | | - PACKAGE: itch.zip |
0 commit comments