Skip to content

I CAN'T KEEP DOING THIS #38

I CAN'T KEEP DOING THIS

I CAN'T KEEP DOING THIS #38

Workflow file for this run

name: Build Geode Mod
on:
workflow_dispatch:
push:
branches:
- "master"
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- name: Windows
os: windows-latest
- name: macOS
os: macos-latest
- name: Android32
os: ubuntu-latest
target: Android32
- name: Android64
os: ubuntu-latest
target: Android64
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- name: Build the mod
uses: geode-sdk/build-geode-mod@main
with:
build-config: RelWithDebInfo
export-pdb: true
combine: true
target: ${{ matrix.config.target }}
package:
name: Package builds
runs-on: ubuntu-latest
needs: ['build']
steps:
- uses: geode-sdk/build-geode-mod/combine@main
id: build
- uses: actions/upload-artifact@v4
with:
name: Build Output
path: ${{ steps.build.outputs.build-output }}
release:
name: Release Version
runs-on: ubuntu-latest
needs: ['package']
steps:
- name: Find Version
id: version
run: |
curl -s https://raw.githubusercontent.com/${{ github.repository }}/master/mod.json -o mod.json
echo version=$(jq -r .version mod.json) >> $GITHUB_OUTPUT
- name: Check Existing Release
id: check
run: |
RELEASE=$(gh release view ${{ steps.version.outputs.version }} --repo ${{ github.repository }} --json tagName || true)
if [ -z "$RELEASE" ]; then
echo "No release found for ${{ steps.version.outputs.version }}, continuing with release"
echo release=1 >> $GITHUB_OUTPUT
else
echo "Release found for ${{ steps.version.outputs.version }}, skipping release"
echo release=0 >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Find Changelog
if: steps.check.outputs.release == '1'
id: changelog
run: |
curl -s https://raw.githubusercontent.com/${{ github.repository }}/master/changelog.md -o changelog.md
echo changelog=$(awk "/## ${{ steps.version.outputs.version }}/{flag=1; next} /##/{flag=0} flag" changelog.md | sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba') >> $GITHUB_OUTPUT
- name: Download Build Output
if: steps.check.outputs.release == '1'
uses: actions/download-artifact@v4
with:
name: Build Output
path: build-output
- name: Release Version
if: steps.check.outputs.release == '1'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
build-output/*.geode
build-output/*.pdb
tag_name: ${{ steps.version.outputs.version }}
body: ${{ steps.changelog.outputs.changelog }}