Skip to content

Workflow experiment... #592

Workflow experiment...

Workflow experiment... #592

name: Publish continuous release of UndertaleModTool
on:
push:
branches: [ master ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build_gui:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
configuration: [Debug]
bundled: [true]
singlefile: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
dotnet build UndertaleModTool --no-restore
dotnet build UndertaleModToolUpdater --no-restore
- name: Publish ${{ matrix.os }} GUI
run: | # FIXME: debug constant isn't being applied here, which disables updater, etc., so need to fix that or possibly add a new constant
dotnet publish UndertaleModTool -c ${{ matrix.configuration }} -r win-x64 -p:DefineConstants="SHOW_COMMIT_HASH" --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=${{ matrix.singlefile }} --output ${{ matrix.os }}
dotnet publish UndertaleModToolUpdater -c ${{ matrix.configuration }} -r win-x64 --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=false --output ${{ matrix.os }}/Updater
- name: Copy external files
run: |
cp ./README.md ./${{ matrix.os }}
cp ./SCRIPTS.md ./${{ matrix.os }}
cp ./LICENSE.txt ./${{ matrix.os }}
- name: Create zip for nightly release Windows GUI
run: |
7z a -tzip GUI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}-isSingleFile-${{ matrix.singlefile }}.zip ./${{ matrix.os }}/* -mx0
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: GUI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}-isSingleFile-${{ matrix.singlefile }}
path: GUI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}-isSingleFile-${{ matrix.singlefile }}.zip
build_cli:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
configuration: [Debug]
bundled: [true]
include:
- os: ubuntu-latest
rid: linux-x64
- os: macOS-latest
rid: osx-x64
- os: windows-latest
rid: win-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore UndertaleModCli
- name: Build
run: dotnet build UndertaleModCli --no-restore
- name: Publish ${{ matrix.os }} CLI
run: dotnet publish UndertaleModCli -c ${{ matrix.configuration }} -r ${{ matrix.rid }} --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=false --output CLI-${{ matrix.os }}
- name: Copy external files
run: |
cp ./README.md ./CLI-${{ matrix.os }}/
cp ./SCRIPTS.md ./CLI-${{ matrix.os }}/
cp ./LICENSE.txt ./CLI-${{ matrix.os }}/
cp -r ./UndertaleModTool/Scripts/ ./CLI-${{ matrix.os }}/Scripts/
- name: Create zip for nightly release CLI
run: |
7z a -tzip CLI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}.zip ./CLI-${{ matrix.os }}/* -mx0
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: CLI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}
path: CLI-${{ matrix.os }}-${{ matrix.configuration }}-isBundled-${{ matrix.bundled }}.zip
upload:
needs: [build_gui, build_cli]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v7
- run: |
gh release delete nightly --cleanup-tag --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: Nightly (bleeding edge)
prerelease: true
fail_on_unmatched_files: true
files: |
*/*
body: |
This is the latest version of UndertaleModTool. Also listed on this page are stable releases, but this is an automatically updating **bleeding edge** build. If you encounter any bugs, please make an issue on GitHub or join the Underminers Discord for help.