fixed dual mode #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Developmental Release | |
on: | |
push: | |
branches: | |
- '*' # Trigger on any branch push | |
jobs: | |
build: | |
name: Build x64-Release | |
runs-on: windows-latest | |
steps: | |
# Checkout the code | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Cache NuGet packages | |
- name: Cache NuGet | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.sln', '**/*.csproj', '**/*.vcxproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
# Cache MSBuild binaries | |
- name: Cache Build Tools | |
uses: actions/cache@v3 | |
with: | |
path: C:\Users\runneradmin\AppData\Local\Microsoft\MSBuild | |
key: msbuild-cache-${{ runner.os }}-${{ hashFiles('**/*.sln', '**/*.vcxproj') }} | |
restore-keys: | | |
msbuild-cache-${{ runner.os }}- | |
# Cache the bin directory | |
- name: Cache Build Artifacts | |
uses: actions/cache@v3 | |
with: | |
path: bin | |
key: bin-cache-${{ runner.os }}-${{ hashFiles('**/*.sln') }} | |
restore-keys: | | |
bin-cache-${{ runner.os }}- | |
# Set up MSBuild | |
- name: Set up MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
# Set up Visual Studio | |
- name: Set up Visual Studio | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' # Adjust based on your requirements | |
# Build the project | |
- name: Build Solution | |
run: msbuild Geome3Dash.sln /p:Configuration=Release /p:Platform=x64 | |
# Compress contents of bin folder into rainixgd.geome3dash.geode | |
- name: Compress Build Output | |
run: | | |
7z.exe a -tzip "D:\a\Geome3Dash\Geome3Dash\bin\rainixgd.geome3dash.geode" -mx9 "D:\a\Geome3Dash\Geome3Dash\bin\*" -x!"D:\a\Geome3Dash\Geome3Dash\bin\7z" -x!"D:\a\Geome3Dash\Geome3Dash\bin\package_adaf.bat" -x!"D:\a\Geome3Dash\Geome3Dash\bin\package_adaf_mx9.bat" -x!"D:\a\Geome3Dash\Geome3Dash\bin\package_workflows.bat" -x!"D:\a\Geome3Dash\Geome3Dash\bin\rainixgd.geome3dash.exp" -x!"D:\a\Geome3Dash\Geome3Dash\bin\rainixgd.geome3dash.lib" -x!"D:\a\Geome3Dash\Geome3Dash\bin\list.bat" -x!"D:\a\Geome3Dash\Geome3Dash\bin\rainixgd.geome3dash.geode" | |
# Upload the compressed file | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rainixgd.geome3dash.geode | |
path: bin/rainixgd.geome3dash.geode | |
release: | |
name: Create Developmental Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# Download the compressed build artifact | |
- name: Download Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: rainixgd.geome3dash.geode | |
path: . | |
# Create GitHub Release | |
- name: Update Development Release | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: develop | |
name: 'Developmental Build' | |
body: | | |
Geome3dash development release for commit ${{ github.sha }}. | |
files: | | |
./rainixgd.geome3dash.geode |