Fix release action

This commit is contained in:
Eric
2025-04-13 15:40:12 +02:00
parent bc7c2fa844
commit af86e5a2a0
3 changed files with 91 additions and 8 deletions

View File

@@ -15,7 +15,12 @@ jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with:
fetch-depth: 1
clean: true
persist-credentials: true
set-safe-directory: true
# get version from pubspec.yaml and check if release already exists # get version from pubspec.yaml and check if release already exists
- name: Get version - name: Get version
id: get_version id: get_version
@@ -58,21 +63,28 @@ jobs:
Move-Item .\build\windows\x64\runner\Release\wsl2distromanager.msix .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix Move-Item .\build\windows\x64\runner\Release\wsl2distromanager.msix .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix
Copy-Item -Path ./windows-dlls/* -Destination ./build/windows/x64/runner/Release/ Copy-Item -Path ./windows-dlls/* -Destination ./build/windows/x64/runner/Release/
Compress-Archive -Path ./build/windows/x64/runner/Release/* -DestinationPath .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip Compress-Archive -Path ./build/windows/x64/runner/Release/* -DestinationPath .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
name: Create nightly release (ZIP) name: Create nightly release (ZIP)
if: ${{ steps.get_version.outputs.exists == 'true' }} if: ${{ steps.get_version.outputs.exists == 'true' }}
with: with:
name: wsl2-distro-manager-nightly-archive name: wsl2-distro-manager-nightly-archive
path: | path: ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip
./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip if-no-files-found: error
- uses: actions/upload-artifact@v3 retention-days: 30
compression-level: 6
overwrite: true
- uses: actions/upload-artifact@v4
name: Create nightly release (MSIX) name: Create nightly release (MSIX)
if: ${{ steps.get_version.outputs.exists == 'true' }} if: ${{ steps.get_version.outputs.exists == 'true' }}
with: with:
name: wsl2-distro-manager-nightly-msix name: wsl2-distro-manager-nightly-msix
path: | path: ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix
./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix if-no-files-found: error
retention-days: 30
compression-level: 6
overwrite: true
# Create full release with tag (only if branch is main) # Create full release with tag (only if branch is main)
- name: Create release - name: Create release
if: ${{ steps.get_version.outputs.exists == 'false' && github.ref == 'refs/heads/main' }} if: ${{ steps.get_version.outputs.exists == 'false' && github.ref == 'refs/heads/main' }}

11
installer/setup.bat Normal file
View File

@@ -0,0 +1,11 @@
@echo off
REM Check for Redistributable and install if needed
if not exist "C:\Windows\System32\vcruntime140.dll" (
echo Installing VC++ Redistributable
:: Uncomment the correct line below for your architecture
:: vc_redist.x86.exe /install /quiet /norestart
vc_redist.x64.exe /install /quiet /norestart
)
mkdir "C:\Program Files\WSL Manager"
copy "WSL Manager.exe" "C:\Program Files\WSL Manager"

60
installer/setup.sed Normal file
View File

@@ -0,0 +1,60 @@
[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=1
InsideCompressed=1
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=
DisplayLicense=%SourceFiles0%\LICENSE
FinishMessage=Installation Complete
TargetName=%EXTRACT_DIR%\wsl2-distro-manager-setup.exe
FriendlyName=WSL2 Distro Manager Installation
AppLaunched=cmd.exe /c setup.bat
PostInstallCmd=
AdminQuietInstCmd=
UserQuietInstCmd=
[Strings]
InstallPrompt=
DisplayLicense=%SourceFiles0%\LICENSE
FinishMessage=Installation Complete
TargetName=%EXTRACT_DIR%\wsl2-distro-manager-setup.exe
FriendlyName=WSL2 Distro Manager Installation
AppLaunched=cmd.exe /c setup.bat
PostInstallCmd=
AdminQuietInstCmd=
UserQuietInstCmd=
[SourceFiles]
SourceFiles0=installer\
[SourceFiles0]
FILE0="setup.bat"
FILE1="vc_redist.x64.exe"
FILE2="desktop_window_plugin.dll"
FILE3="flutter_acrylic_plugin.dll"
FILE4="flutter_localization_plugin.dll"
FILE5="flutter_windows.dll"
FILE6="screen_retriever_windows_plugin.dll"
FILE7="system_theme_plugin.dll"
FILE8="url_launcher_windows_plugin.dll"
FILE9="window_manager_plugin.dll"
FILE10="LICENSE"
%FILE0%=
%FILE1%=
%FILE2%=
%FILE3%=
%FILE4%=
%FILE5%=
%FILE6%=
%FILE7%=
%FILE8%=
%FILE9%=
%FILE10%=