Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI to build Linux binaries #5

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/godot-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Godot Linux"
on:
workflow_dispatch:
pull_request:
release:
types:
- released

env:
GODOT_VERSION: 3.6
EXPORT_NAME: rota-linux

jobs:
export:
name: Export
runs-on: ubuntu-latest
container:
image: docker.io/smks/godot-ci:3.6
cassidyjames marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true

- name: Set up export templates
run: |
mkdir -v -p ~/.local/share/godot/templates/
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable

- name: Export
run: |
mkdir --verbose --parents ./export/linux
godot --no-window --path=./project.godot --export "Linux/X11" ./export/linux/${EXPORT_NAME}.x86_64

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.EXPORT_NAME }}
path: |
export/linux/${{ env.EXPORT_NAME }}.x86_64
export/linux/${{ env.EXPORT_NAME }}.pck

release:
name: Release
needs: export
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.EXPORT_NAME }}

- name: Display downloaded files
run: ls -R

- name: Upload to release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload '${{ github.ref_name }}' * --repo '${{ github.repository }}'