Skip to content

Commit 8b37dc7

Browse files
mutliple updates (ci, reuse ...)
1 parent 9bf3e86 commit 8b37dc7

40 files changed

+828
-241
lines changed

.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[codespell]
3+
skip = assets/**,addons/**
4+
ignore-words-list = lod,LOD

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Normalize EOL for all files that Git considers text files.
22
* text=auto eol=lf
3-
3+
*.gd linguist-language=GDScript
44
*.hdr binary
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Export Godot game
2+
description: Export Godot game.
3+
inputs:
4+
platform:
5+
description: The game platform.
6+
required: true
7+
output:
8+
description: The game output.
9+
required: true
10+
version:
11+
description: The game version.
12+
required: true
13+
godot_version:
14+
description: The Godot version.
15+
required: true
16+
preset:
17+
description: The export preset.
18+
required: true
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Add Build Info
23+
uses: robpc/godot-build-info-action@v1
24+
with:
25+
version: ${{ inputs.version }}
26+
27+
- name: Setup Godot
28+
uses: chickensoft-games/setup-godot@v1
29+
with:
30+
version: ${{ inputs.godot_version }}
31+
use-dotnet: false
32+
33+
- name: Build ${{ inputs.preset }}
34+
shell: bash
35+
run: |
36+
[ -d build ] && rm -r build
37+
mkdir -v -p build/${{ inputs.platform }}
38+
godot --export "${{ inputs.preset }}" ./build/${{ inputs.platform }}/${{ inputs.output }} || true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Upload artifact
2+
description: Upload artifact.
3+
inputs:
4+
name:
5+
description: The artifact name.
6+
default: "${{ github.job }}"
7+
path:
8+
description: The path to upload.
9+
required: true
10+
default: "build/*"
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Upload Artifact
15+
uses: actions/upload-artifact@v3
16+
with:
17+
name: ${{ inputs.name }}
18+
path: ${{ inputs.path }}
19+
retention-days: 1

.github/workflows/release-packaging.yml

Lines changed: 45 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -5,150 +5,66 @@ on:
55
branches: [main]
66
workflow_dispatch:
77

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-
138
jobs:
14-
export-windows:
15-
name: Windows Export
9+
release-packaging:
1610
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
4612

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
5234
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
6038
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
6545
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 }}
7951

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
9854
with:
99-
name: web
100-
path: build/web
55+
name: RootedShadow-${{ matrix.platform }}-v${{ env.version }}
56+
path: build/${{ matrix.platform }}
57+
10158
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
10259
- name: Install rsync
60+
if: ${{ matrix.platform == 'web' }}
10361
run: |
10462
apt-get update && apt-get install -y rsync
63+
10564
- name: Deploy to GitHub Pages
65+
if: ${{ matrix.platform == 'web' }}
10666
uses: JamesIves/github-pages-deploy-action@v4
10767
with:
10868
token: ${{ secrets.GITHUB_TOKEN }}
10969
branch: gh-pages # The branch the action should deploy to.
11070
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

.godot_version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.5.2

.pre-commit-config.yaml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
3+
rev: v4.4.0
44
hooks:
55
- id: fix-byte-order-marker # Prevents weird UTF-8 encoding edge cases
66
- id: check-case-conflict # Check if case-insensitive filesystems would bork
@@ -13,20 +13,68 @@ repos:
1313
- id: end-of-file-fixer # Checks for ending with a newline
1414
- id: mixed-line-ending # Consistent LF or CRLF
1515
- id: trailing-whitespace # No trailing whitespace
16+
- repo: https://github.com/codespell-project/codespell
17+
rev: v2.2.5
18+
hooks:
19+
- id: codespell
20+
- repo: https://github.com/fsfe/reuse-tool
21+
rev: v2.0.0
22+
hooks:
23+
- id: reuse
24+
- repo: https://github.com/PyCQA/isort
25+
rev: 5.12.0
26+
hooks:
27+
- id: isort
28+
- repo: https://github.com/PyCQA/bandit
29+
rev: 1.7.5
30+
hooks:
31+
- id: bandit
32+
- repo: https://github.com/PyCQA/flake8
33+
rev: 6.0.0
34+
hooks:
35+
- id: flake8
36+
- repo: https://github.com/pre-commit/mirrors-mypy
37+
rev: v1.4.1
38+
hooks:
39+
- id: mypy
1640
- repo: https://github.com/doublify/pre-commit-rust
1741
rev: v1.0
1842
hooks:
1943
- id: fmt
2044
- id: cargo-check
2145
- id: clippy
46+
- repo: https://github.com/nix-community/nixpkgs-fmt
47+
rev: v1.2.0
48+
hooks:
49+
- id: nixpkgs-fmt
2250
- repo: local
2351
hooks:
52+
- id: lower-case-only
53+
name: lower case only
54+
entry: filenames must be lower-case or lower_case only
55+
language: fail
56+
files: '[^a-z0-9._/-]'
57+
exclude: |
58+
(?x)^(
59+
.reuse/|
60+
LICENSES/|
61+
public/|
62+
Makefile|
63+
CONTRIBUTING.md|
64+
CREDITS.md|
65+
LICENSE.md|
66+
README.md
67+
)
2468
- id: check-gdscript
2569
name: check gdscript
2670
entry: gdformat
2771
language: system
2872
files: \.gd$
29-
exclude: ^addons/
73+
exclude: |
74+
(?x)^(
75+
addons/|
76+
plug.gd
77+
)
3078
- id: check-shaders
3179
name: check shaders
3280
entry: clang-format
@@ -41,4 +89,8 @@ repos:
4189
entry: gdlint
4290
language: system
4391
files: \.gd$
44-
exclude: ^addons/
92+
exclude: |
93+
(?x)^(
94+
addons/|
95+
plug.gd
96+
)

.reuse/REUSE-compliant.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)