mirror of
https://github.com/D4M13N-D3V/godot_template.git
synced 2025-03-14 10:04:59 +00:00
added linux ci
This commit is contained in:
parent
1bcf032e4a
commit
53867e6ede
155
.github/workflows/game_web_ci.yml
vendored
155
.github/workflows/game_web_ci.yml
vendored
@ -10,6 +10,49 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
container:
|
||||||
|
image: barichello/godot-ci:4.1.2
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Move HTML5 templates into position
|
||||||
|
run: |
|
||||||
|
mkdir -v -p ~/.local/share/godot/export_templates
|
||||||
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
||||||
|
- name: Create staging directory
|
||||||
|
run: mkdir -v -p build/web
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: godot -v --export-release --headless "Web"
|
||||||
|
deploy-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-web
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
container:
|
||||||
|
image: barichello/godot-ci:4.1.2
|
||||||
|
steps:
|
||||||
|
- name: Add coi-service-worker
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/gzuidhof/coi-serviceworker.git
|
||||||
|
mv coi-serviceworker/coi-serviceworker.js build/web/coi-serviceworker.js
|
||||||
|
sed -i '3 i <script src="coi-serviceworker.js"></script>' build/web/index.html
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./build/web
|
||||||
|
force_orphan: true
|
||||||
|
user_name: "github-ci[bot]"
|
||||||
|
user_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
|
commit_message: "UPDATE GITHUB PAGES"
|
||||||
|
|
||||||
build_linux:
|
build_linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
@ -31,15 +74,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Build for Linux
|
- name: Build for Linux
|
||||||
run: godot -v --export "Linux/X11" --path . --output "build/linux/game.x86_64"
|
run: godot -v --export "Linux/X11" --path . --output "build/linux/game.x86_64"
|
||||||
|
|
||||||
zip_linux:
|
zip_linux:
|
||||||
needs: build_linux
|
needs: build_linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Zip Linux artifacts
|
- name: Zip Linux artifacts
|
||||||
run: cd build/linux && zip -r game_linux.zip game.x86_64
|
run: cd build/linux && zip -r game_linux.zip game.x86_64
|
||||||
|
|
||||||
upload_linux:
|
upload_linux:
|
||||||
needs: zip_linux
|
needs: zip_linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -50,112 +90,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: game_linux
|
name: game_linux
|
||||||
path: build/linux/game_linux.zip
|
path: build/linux/game_linux.zip
|
||||||
|
|
||||||
build_windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
container:
|
|
||||||
image: barichello/godot-ci:4.1.2
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Move HTML5 templates into position
|
|
||||||
run: |
|
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates
|
|
||||||
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
||||||
- name: Create staging directory
|
|
||||||
run: mkdir -v -p build/windows
|
|
||||||
|
|
||||||
- name: Build for Windows
|
|
||||||
run: godot -v --export "Windows Desktop" --path . --output "build/windows/game.exe"
|
|
||||||
|
|
||||||
zip_windows:
|
|
||||||
needs: build_windows
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Zip Windows artifacts
|
|
||||||
run: cd build/windows && zip -r game_windows.zip game.exe
|
|
||||||
|
|
||||||
upload_windows:
|
|
||||||
needs: zip_windows
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Upload Windows artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: game_windows
|
|
||||||
path: build/windows/game_windows.zip
|
|
||||||
|
|
||||||
build_mac:
|
|
||||||
runs-on: macos-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
container:
|
|
||||||
image: barichello/godot-ci:4.1.2
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Move HTML5 templates into position
|
|
||||||
run: |
|
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates
|
|
||||||
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
||||||
- name: Create staging directory
|
|
||||||
run: mkdir -v -p build/mac
|
|
||||||
|
|
||||||
- name: Build for Mac
|
|
||||||
run: godot -v --export "Mac OSX" --path . --output "build/mac/game.zip"
|
|
||||||
|
|
||||||
zip_mac:
|
|
||||||
needs: build_mac
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Zip Mac artifacts
|
|
||||||
run: cd build/mac && zip -r game_mac.zip game.zip
|
|
||||||
|
|
||||||
upload_mac:
|
|
||||||
needs: zip_mac
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Upload Mac artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: game_mac
|
|
||||||
path: build/mac/game_mac.zip
|
|
||||||
|
|
||||||
add_service_worker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add coi-service-worker
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/gzuidhof/coi-serviceworker.git
|
|
||||||
mv coi-serviceworker/coi-serviceworker.js build/web/coi-serviceworker.js
|
|
||||||
ls build/
|
|
||||||
ls build/web/
|
|
||||||
sed -i '3 i <script src="coi-serviceworker.js"></script>' build/web/index.html
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: [upload_linux, upload_windows, upload_mac, add_service_worker]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v3.9.3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./build/web
|
|
||||||
force_orphan: true
|
|
||||||
user_name: "github-ci[bot]"
|
|
||||||
user_email: "github-actions[bot]@users.noreply.github.com"
|
|
||||||
commit_message: "UPDATE GITHUB PAGES"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user