|
@@ -33,10 +33,10 @@ jobs:
|
|
|
# Step 4: Define paths
|
|
|
- name: Define paths
|
|
|
id: paths
|
|
|
- shell: pwsh
|
|
|
run: |
|
|
|
- $outputDir = (Resolve-Path "PicView-v.${{steps.get-version.outputs.file-version}}-win-x64").Path
|
|
|
+ $outputDir = "PicView-v.${{steps.get-version.outputs.file-version}}-win-x64"
|
|
|
echo "##[set-output name=output_dir;]$outputDir"
|
|
|
+ shell: pwsh
|
|
|
|
|
|
# Step 5: Run dotnet publish
|
|
|
- name: Publish the project
|
|
@@ -83,21 +83,27 @@ jobs:
|
|
|
path: ${{ steps.paths.outputs.output_dir }}
|
|
|
retention-days: 14
|
|
|
|
|
|
- # Step 9: Generate the Inno Setup Installer
|
|
|
- - name: Generate Inno Setup variables
|
|
|
+ # Step 9: Generate the Inno Setup Installer and copy files to the build directory
|
|
|
+ - name: Generate Inno Setup variables and copy files to Build directory
|
|
|
run: |
|
|
|
-
|
|
|
- # Create output directory for installer
|
|
|
- New-Item -Path ${{ steps.paths.outputs.output_dir }}\install -ItemType Directory -Force
|
|
|
-
|
|
|
- shell: pwsh
|
|
|
+ # Create the directory inside 'Build'
|
|
|
+ $buildDir = Join-Path -Path "${{ github.workspace }}" -ChildPath "Build\install"
|
|
|
+ if (Test-Path $buildDir) {
|
|
|
+ Remove-Item -Path $buildDir -Recurse -Force
|
|
|
+ }
|
|
|
+ New-Item -Path $buildDir -ItemType Directory | Out-Null
|
|
|
+
|
|
|
+ # Copy the portable build output to this new directory
|
|
|
+ $outputPath = "${{ steps.paths.outputs.output_dir }}"
|
|
|
+ Copy-Item -Path "$outputPath\*" -Destination $buildDir -Recurse -Force
|
|
|
+ shell: pwsh
|
|
|
|
|
|
# Step 10: Compile .ISS to .EXE Installer
|
|
|
- name: Compile .ISS to .EXE Installer
|
|
|
uses: Minionguyjpro/[email protected]
|
|
|
with:
|
|
|
path: .\Build\install.iss
|
|
|
- options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ steps.paths.outputs.output_dir }} /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt
|
|
|
+ options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install /DMyFileSource=${{ github.workspace }}\Build\install /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt
|
|
|
|
|
|
# Step 11: Upload the Inno Setup Installer as an artifact
|
|
|
- name: Upload Inno Setup Installer
|