Skip to content

Commit

Permalink
CI-CD-workflow (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kesuaheli authored May 5, 2024
1 parent 7f6603a commit d8a5201
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .github/workflows/cicd-steam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build Godot Executeable

on:
push:
branches: main

pull_request:
branches: main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- os: windows
file_extension: .exe
- os: linux
file_extension: ''
steps:
- uses: actions/checkout@v4
- name: Godot Build
id: build
# workaround for https://github.com/yeslayla/build-godot-action/issues/30
uses: manleydev/build-godot-action@f759ed7f8fcb5137cb70873ecf663aa8a1bd998b
with:
name: Quiz4Everyone${{ matrix.platform.file_extension }}
preset: ${{ matrix.platform.os }}
debugMode: ${{ github.event_name != 'push' || github.ref != 'main' }}
- name: Save Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.os }}
path: ${{ github.workspace }}/${{ steps.build.outputs.build }}
upload:
needs: build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'main' }}
steps:
- uses: actions/checkout@v4
with:
path: Quiz4Everyone
- name: Get Artifacts
uses: actions/download-artifact@v4
with:
path: build
- name: Set output
id: vars
run: |
cd Quiz4Everyone
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Deploy to Steamworks
uses: game-ci/steam-deploy@v3
with:
username: ${{ vars.SteamUsername }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
appId: ${{ vars.SteamAppID }}
buildDescription: github-${{ steps.vars.outputs.sha_short }} ${{ github.event.head_commit.message }}
rootPath: build
depot1Path: '.'
releaseBranch: alpha
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Godot-specific ignores
.import/
export.cfg
export_presets.cfg

# Imported translations (automatically generated from CSV files)
*.translation
Expand Down
102 changes: 102 additions & 0 deletions export_presets.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[preset.0]

name="windows"
platform="Windows Desktop"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="export/Quiz4Everyone.exe"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false

[preset.0.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name="Cake4Everyone"
application/product_name="Quiz4Everyone"
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

[preset.1]

name="linux"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false

[preset.1.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""

0 comments on commit d8a5201

Please sign in to comment.