63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Build Game
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v*.*.*" # only match version tags like v1.0.0
|
|
|
|
jobs:
|
|
prepare:
|
|
name: Build & push runner image
|
|
runs-on: docker-cli-node24 # the label of your runner
|
|
steps:
|
|
- name: Checkout runner Dockerfile
|
|
uses: actions/checkout@v5
|
|
with:
|
|
sparse-checkout: |
|
|
.forgejo/runner/Dockerfile
|
|
sparse-checkout-cone-mode: false
|
|
fetch-depth: 1
|
|
|
|
- name: Build & push runner image
|
|
run: |
|
|
ls -l
|
|
docker build --network=host -t ${{ vars.REGISTRY_URL }}/asteroids/runner:latest -f .forgejo/runner/Dockerfile .
|
|
docker push ${{ vars.REGISTRY_URL }}/asteroids/runner:latest
|
|
|
|
export:
|
|
name: Build Asteroids for all platforms
|
|
needs: prepare
|
|
runs-on: docker-cli-node24
|
|
container:
|
|
image: ${{ vars.REGISTRY_URL }}/asteroids/runner:latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Prepare build folder
|
|
run: mkdir -p build
|
|
|
|
- name: Export Linux
|
|
run: godot --headless --export-release "Linux" build/asteroids.x86_64
|
|
|
|
- name: Export Windows
|
|
run: godot --headless --export-release "Windows Desktop" build/asteroids.exe
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: builds
|
|
path: build/*
|
|
|
|
- name: Create Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: actions/forgejo-release@v2.7.3
|
|
with:
|
|
direction: upload
|
|
title: ${{ github.ref_name }}
|
|
tag: ${{ github.ref_name }}
|
|
release-dir: build
|
|
release-notes-assistant: true
|
|
|