Skip to content

Commit

Permalink
Updated workedflow to build a single executable.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnLouderback committed Nov 30, 2024
1 parent 1b2e10e commit eb098d9
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,27 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0 # Update to your target framework if needed
dotnet-version: 8.0 # SDK version to use

# Restore dependencies
- name: Restore Dependencies
run: dotnet restore
run: dotnet restore WbfsFileSplitter/WbfsFileSplitter.csproj

# Publish the application
# Publish the application as a single executable
- name: Publish Application
run: dotnet publish -c Release -r win-x64 --self-contained true -o ./publish
run: dotnet publish WbfsFileSplitter/WbfsFileSplitter.csproj -c Release -r win-x64 -p:PublishSingleFile=true -o ./publish --self-contained true

# Package the published application into a zip file
- name: Package Published Application
run: Compress-Archive -Path ./publish/* -DestinationPath ./WBFSFileSplitter.zip
shell: pwsh

# Upload the zip file as a build artifact
# Find and upload the single .exe file as an artifact
- name: Upload Executable
run: |
$exeFile = Get-ChildItem -Path ./publish -Filter "*.exe" | Select-Object -First 1
echo "Found executable: $($exeFile.FullName)"
mv $exeFile.FullName ./WBFSFileSplitter.exe
shell: pwsh

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: WBFSFileSplitter
path: WBFSFileSplitter.zip
path: WBFSFileSplitter.exe

0 comments on commit eb098d9

Please sign in to comment.