Skip to content

Commit

Permalink
Feature/cicd (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
alnikyur authored Jan 6, 2025
1 parent 8f93675 commit 6a53822
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Astrolaser builf and release

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Build project
run: |
sudo bash .github/workflows/scripts/prebuild.sh
/usr/local/bin/godot --headless --path . --export-release "Windows Desktop" game.exe
zip astrolaser_x64_windows.zip game.exe game.pck
- name: Upload build artifact windows
uses: actions/upload-artifact@v3
with:
name: astrolaser-artifact-win
path: astrolaser_x64_windows.zip

release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifact win
uses: actions/download-artifact@v3
with:
name: astrolaser-artifact-win
path: ./

- name: Create Release and Upload Assets
uses: ncipollo/release-action@v1
with:
artifacts: "astrolaser_x64_windows.zip,labyrintum_x64_linux.zip"
bodyFile: "body.md"
22 changes: 22 additions & 0 deletions .github/workflows/scripts/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash -x

set -e

GODOT_VERSION="Godot_v4.2-stable_linux.x86_64"

wget https://github.com/godotengine/godot-builds/releases/download/4.2-stable/${GODOT_VERSION}.zip

sudo apt update \
&& apt install -y libfontconfig unzip \
&& unzip ${GODOT_VERSION}

sudo mv ${GODOT_VERSION} /usr/local/bin/godot
sudo chmod +x /usr/local/bin/godot && godot --version

# Install godot templates
wget https://github.com/godotengine/godot-builds/releases/download/4.2-stable/Godot_v4.2-stable_export_templates.tpz
unzip Godot_v4.2-stable_export_templates.tpz
sudo mkdir -p ~/.local/share/godot/export_templates/4.2.stable/
sudo mkdir -p /home/runner/.local/share/godot/export_templates/4.2.stable/
sudo cp -rv templates/* ~/.local/share/godot/export_templates/4.2.stable/
sudo cp -rv templates/* /home/runner/.local/share/godot/export_templates/4.2.stable/
5 changes: 5 additions & 0 deletions body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Astrolaser - Release Notes

## Version: v0.0.1

### First game release

0 comments on commit 6a53822

Please sign in to comment.