Merge pull request #31 from daerogami/github-actions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Submit Dev' | |
on: | |
push: | |
branches: [ 'dev' ] | |
env: | |
GODOT_VERSION: 4.3 | |
PROJECT_FILE: src/project.godot | |
VERSION_REGEX: config\/version=\"\K[0-9.\-A-z]* | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout current branch | |
uses: actions/checkout@v4 | |
- name: Checkout LFS | |
run: git lfs fetch --all && git lfs checkout | |
- name: Install Godot | |
uses: CapsCollective/godot-actions/[email protected] | |
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: CapsCollective/godot-actions/[email protected] | |
with: | |
godot-executable: ${{ steps.install-godot.outputs.godot-executable }} | |
generate-release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch | |
uses: actions/checkout@v4 | |
- name: Extract version | |
uses: CapsCollective/version-actions/[email protected] | |
with: | |
version-file: ${{ env.PROJECT_FILE }} | |
version-regex: ${{ env.VERSION_REGEX }} | |
id: extract-version | |
- name: Download macOS artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: macos | |
path: artifacts/macos | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows | |
path: artifacts/windows | |
- name: Download Linux artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux | |
path: artifacts/linux | |
- name: Tag and upload artifacts to release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.extract-version.outputs.version-string }} | |
commit: ${{ github.sha }} | |
allowUpdates: false | |
artifactErrorsFailBuild: true | |
prerelease: true | |
artifacts: artifacts/*/* |