Skip to content

Commit

Permalink
ci: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Sep 9, 2023
1 parent 259b0b6 commit aa625f9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

[codespell]
skip = assets/**,addons/**
skip = assets/**,addons/**,LICENSES/**
ignore-words-list = lod,LOD
12 changes: 3 additions & 9 deletions .github/actions/export-game/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
description: The game platform.
required: true
type: choice
options:
options:
- windows
- linux
- mac
Expand Down Expand Up @@ -55,11 +55,5 @@ runs:
run: |
[ -d build ] && rm -r build
mkdir -v -p build/${{ inputs.platform }}
declare -A outputs
outputs['windows'] = '${{ inputs.name }}.exe'
outputs['linux'] = '${{ inputs.name }}.x86_64'
outputs['mac'] = '${{ inputs.name }}.zip'
outputs['web'] = 'index.html'
timeout 60 godot --export-release "${{ inputs.preset }}" --headless ./build/${{ inputs.platform }}/outputs[${{ inputs.platform }}] || true
declare -A outputs=(["windows"]="${{ inputs.name }}.exe" ["linux"]="${{ inputs.name }}.x86_64" ["mac"]="${{ inputs.name }}.zip" ["web"]="index.html")
timeout 60 godot --export-release "${{ inputs.preset }}" --headless ./build/${{ inputs.platform }}/${outputs[${{ inputs.platform }}]} || true
19 changes: 5 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,7 @@ on:
workflow_dispatch:

jobs:
pre_check:
runs-on: ubuntu-22.04

name: Pre-check
steps:
- name: Ensure version is bump for tag
run: |
game_version=$(cat .version)
if [[ "${{ github.ref }}" =~ ^refs/tags/* ]]; then
echo "A tag is pushed"
[ "$game_version" == "$GITHUB_REF_NAME" ] && echo "The version file is correct" || exit 2
fi
build:
needs: pre_check
runs-on: ubuntu-20.04
timeout-minutes: 30

Expand Down Expand Up @@ -51,6 +37,11 @@ jobs:
echo "godot_version=$(cat .godot_version)" >> $GITHUB_ENV
./bump_version.sh
- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
[ "${{ env.game_version }}" == "$GITHUB_REF_NAME" ] || exit 2
- name: Export Marble
uses: ./.github/actions/export-game
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
create_release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-22.04

name: Create Release
steps:
- name: Create Draft release
Expand Down Expand Up @@ -68,4 +68,4 @@ jobs:
ITCH_GAME: marble
ITCH_USER: mechanical-flower
PACKAGE: dist/${{ matrix.platform }}/Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME.zip
VERSION: $GITHUB_REF_NAME
VERSION: $GITHUB_REF_NAME

0 comments on commit aa625f9

Please sign in to comment.