2024-08-06 09:18:48 +00:00
|
|
|
name: Release Godot Configurator
|
2024-08-05 18:25:25 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-08-05 19:23:42 +00:00
|
|
|
branches: [ feat/godot-configurator ]
|
2024-08-05 22:21:41 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ feat/godot-configurator ]
|
|
|
|
|
2024-08-05 18:25:25 +00:00
|
|
|
env:
|
|
|
|
GODOT_VERSION: 4.2.2
|
2024-08-06 00:46:37 +00:00
|
|
|
EXPORT_NAME: RetroDECK-Configurator
|
2024-08-06 09:33:05 +00:00
|
|
|
#match tag in project settings of Godot
|
2024-08-06 09:18:48 +00:00
|
|
|
TAG: v0.5
|
2024-08-05 18:25:25 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
export-linux:
|
|
|
|
name: Linux Export 🐧
|
|
|
|
runs-on: ubuntu-latest
|
2024-08-05 22:34:11 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: tools/configurator
|
2024-08-05 18:25:25 +00:00
|
|
|
container:
|
|
|
|
image: docker://barichello/godot-ci:4.2.2
|
|
|
|
steps:
|
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Setup 💻
|
|
|
|
run: |
|
2024-08-05 22:21:41 +00:00
|
|
|
mkdir -v -p build/${EXPORT_NAME}-Linux-64bit ~/.local/share/godot/export_templates
|
2024-08-05 18:25:25 +00:00
|
|
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
|
|
- name: Import resources once 📦
|
|
|
|
continue-on-error: true
|
|
|
|
run: godot --headless -v --import
|
|
|
|
- name: Linux Build 🔧
|
2024-08-05 22:37:25 +00:00
|
|
|
continue-on-error: true
|
2024-08-06 09:33:05 +00:00
|
|
|
# --export-release has to match the export template in Godot project
|
2024-08-05 18:25:25 +00:00
|
|
|
run: |
|
2024-08-05 23:44:05 +00:00
|
|
|
godot --headless -v --export-release "Linux/X11 64-bit" ~/$EXPORT_NAME.pck
|
2024-08-05 22:21:41 +00:00
|
|
|
- name: Give execute permission ☑️
|
|
|
|
run: |
|
2024-08-05 23:44:05 +00:00
|
|
|
chmod +x ~/$EXPORT_NAME.pck
|
2024-08-05 18:25:25 +00:00
|
|
|
- name: Create tar.gz archive 🗜️
|
|
|
|
run: |
|
2024-08-06 00:53:09 +00:00
|
|
|
tar zcvf ~/${EXPORT_NAME}.tar.gz ~/$EXPORT_NAME.pck
|
2024-08-05 23:26:34 +00:00
|
|
|
|
2024-08-06 09:33:05 +00:00
|
|
|
# Create artifacts in action. Optional item
|
2024-08-06 00:29:58 +00:00
|
|
|
- name: Upload Linux x86_64 Artifact 🚀
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-08-06 00:46:37 +00:00
|
|
|
name: ${{env.EXPORT_NAME}}
|
|
|
|
path: ~/${{env.EXPORT_NAME}}.tar.gz
|
2024-08-06 00:29:58 +00:00
|
|
|
retention-days: 14
|
2024-08-05 23:33:28 +00:00
|
|
|
|
2024-08-06 09:18:48 +00:00
|
|
|
# Upload release linked to tag
|
2024-08-06 09:33:05 +00:00
|
|
|
# had to explicitly call folder reference
|
2024-08-05 23:33:28 +00:00
|
|
|
- name: Upload Release Asset 🚀
|
2024-08-06 09:22:24 +00:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
2024-08-05 23:33:28 +00:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
2024-08-06 09:36:43 +00:00
|
|
|
file: /github/home/RetroDECK-tar.gz
|
2024-08-05 23:33:28 +00:00
|
|
|
tag: ${{env.TAG}}
|
|
|
|
overwrite: true
|
|
|
|
file_glob: true
|