Skip to content

v1.5.5

v1.5.5 #29

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 }}
draft:
name: Draft Release
runs-on: ubuntu-latest
needs: ['package']
steps:
- name: Delete Existing Release
uses: actions/github-script@v7
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = process.env.GITHUB_REPOSITORY.split("/")[0];
const repo = process.env.GITHUB_REPOSITORY.split("/")[1];
const response = await github.rest.repos.listReleases({ owner, repo });
console.log("Checking for existing release...");
for (const release of response.data) {
if (release.tag_name == process.env.COMMIT_MESSAGE) {
console.log("Existing release found, deleting...");
await github.rest.repos.deleteRelease({ owner, repo, release_id: release.id });
await github.rest.git.updateRef({
owner,
repo,
ref: `tags/${release.tag_name}`,
sha: context.sha,
force: true
});
}
}
console.log("Done.");
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: Build Output
path: build-output
- name: Create Draft Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
build-output/*.geode
build-output/*.pdb
tag_name: ${{ github.event.head_commit.message }}
name: ${{ github.event.head_commit.message }}
draft: true