mirror of
https://github.com/D4M13N-D3V/godot_template.git
synced 2025-03-14 10:04:59 +00:00
added configurations for which builds u want
This commit is contained in:
parent
da9e21414a
commit
40a239aeb2
37
.github/workflows/game_web_ci.yml
vendored
37
.github/workflows/game_web_ci.yml
vendored
@ -2,6 +2,10 @@ name: "Godot 4.1.2 CI/CD"
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GODOT_VERSION: 4.1.2
|
GODOT_VERSION: 4.1.2
|
||||||
|
BUILD_WEB: 'true' # Set to 'true' to build for Web
|
||||||
|
BUILD_LINUX: 'true' # Set to 'true' to build for Linux
|
||||||
|
BUILD_WINDOWS: 'true' # Set to 'true' to build for Windows
|
||||||
|
DEPLOY_GH_PAGES: 'true' # Set to 'true' to deploy to GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -11,11 +15,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
web:
|
web:
|
||||||
|
if: ${{ env.BUILD_WEB == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
container:
|
container:
|
||||||
image: barichello/godot-ci:4.1.2
|
image: barichello/godot-ci:${{ env.GODOT_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -37,6 +42,7 @@ jobs:
|
|||||||
sed -i '3 i <script src="coi-serviceworker.js"></script>' build/web/index.html
|
sed -i '3 i <script src="coi-serviceworker.js"></script>' build/web/index.html
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
if: ${{ env.DEPLOY_GH_PAGES == 'true' }}
|
||||||
uses: peaceiris/actions-gh-pages@v3.9.3
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -54,14 +60,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: game_web
|
name: game_web
|
||||||
path: game_web.zip
|
path: game_web.zip
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
|
if: ${{ env.BUILD_LINUX == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: barichello/godot-ci:4.1.2
|
image: barichello/godot-ci:${{ env.GODOT_VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -84,14 +90,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: game_linux
|
name: game_linux
|
||||||
path: game_linux.zip
|
path: game_linux.zip
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
|
if: ${{ env.BUILD_WINDOWS == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: barichello/godot-ci:4.1.2
|
image: barichello/godot-ci:${{ env.GODOT_VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -114,6 +120,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: game_windows
|
name: game_windows
|
||||||
path: game_windows.zip
|
path: game_windows.zip
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [web, linux, windows]
|
needs: [web, linux, windows]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -175,18 +182,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release
|
||||||
asset_path: ./build/linux/*
|
|
||||||
asset_name: Godot_Game_Linux.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload Windows Release Asset
|
|
||||||
id: upload-windows-release-asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./build/windows/*
|
|
||||||
asset_name: Godot_Game_Windows.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user