Skip to content

GitHub actions (testing) #29

GitHub actions (testing)

GitHub actions (testing) #29

Workflow file for this run

name: 'Verify Dev'
on:
pull_request:
branches: [ 'dev' ]
env:
GODOT_VERSION: 4.3
PROJECT_FILE: src/project.godot
VERSION_REGEX: config\/version=\"\K[0-9.\-A-z]*
jobs:
check-version-bump:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Extract old version string
uses: CapsCollective/version-actions/[email protected]
with:
version-file: ${{ env.PROJECT_FILE }}
version-regex: ${{ env.VERSION_REGEX }}
id: extract-version-old
- name: Checkout current branch
uses: actions/checkout@v4
- name: Extract new version string
uses: CapsCollective/version-actions/[email protected]
with:
version-file: ${{ env.PROJECT_FILE }}
version-regex: ${{ env.VERSION_REGEX }}
id: extract-version-new
- name: Check semantic version bump
uses: CapsCollective/version-actions/[email protected]
with:
new-version: ${{ steps.extract-version-new.outputs.version-string }}
old-version: ${{ steps.extract-version-old.outputs.version-string }}
run-project-validation:
needs: check-version-bump
runs-on: macos-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
- name: Install Godot
uses: ./.github/actions/install-godot
with:
godot-version: ${{ env.GODOT_VERSION }}
id: install-godot
- name: Open Godot editor for reimport
run: ${{ steps.install-godot.outputs.godot-executable }} --editor --headless --quit || true
# disabled as we dont have any validation scripts, yet
- name: Run project validations
if: false
run: ${{ steps.install-godot.outputs.godot-executable }} --script scripts/run_validations.gd --headless
build:
needs: run-project-validation
runs-on: macos-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
- name: Checkout LFS
run: git lfs fetch --all && git lfs checkout
# Alternative Godot runner, docs - https://github.com/marketplace/actions/godot-ci
#- name: godot-ci
# uses: abarichello/[email protected]
- name: Install Godot
uses: ./.github/actions/install-godot
with:
godot-version: ${{ env.GODOT_VERSION }}
install-templates: true
id: install-godot
- name: Open Godot editor for reimport
run: ${{ steps.install-godot.outputs.godot-executable }} --editor --headless --quit || true
- name: Build and upload artifacts for all platforms
uses: ./.github/actions/build-godot
with:
godot-executable: ${{ steps.install-godot.outputs.godot-executable }}
project-dir: './src'