diff --git a/.github/release.sh b/.github/release.sh index 7555a81..9a187f3 100644 --- a/.github/release.sh +++ b/.github/release.sh @@ -7,4 +7,4 @@ zip -r redists.zip * mv redists.zip ../ cd .. rm -rf redists/ -zip -r offlineInstall.zip 7za.exe 7za.dll redists.zip Redist-Installer.bat +zip -r offlineInstall.zip 7za.exe redists.zip Redist-Installer.bat diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ccbc93..12364b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,8 +8,6 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - run: "bash ${GITHUB_WORKSPACE}/.github/release.sh" @@ -21,7 +19,6 @@ jobs: title: "Release" files: | Redist-Installer.bat - 7za.dll 7za.exe redists.zip offlineInstall.zip diff --git a/7za.dll b/7za.dll deleted file mode 100644 index 1eac5c5..0000000 Binary files a/7za.dll and /dev/null differ diff --git a/Redist-Installer.bat b/Redist-Installer.bat index 0e10b16..c17a1b4 100644 --- a/Redist-Installer.bat +++ b/Redist-Installer.bat @@ -11,25 +11,20 @@ title Redist Installer md %temp%\Redist-Installer >nul 2>&1 :: If we have all the offline installer files, copy and skip the downloading. -if exist "7za.dll" ( - if exist "7za.exe" ( - if exist "redists.zip" ( - copy /Y 7za.dll %temp%\Redist-Installer >nul - copy /Y 7za.exe %temp%\Redist-Installer >nul - copy /Y redists.zip %temp%\Redist-Installer >nul - goto offlineInstall - ) +if exist "7za.exe" ( + if exist "redists.zip" ( + copy /Y 7za.exe %temp%\Redist-Installer >nul + copy /Y redists.zip %temp%\Redist-Installer >nul + goto offlineInstall ) ) :: If we do not have the offline installer files, download them. :onlineInstall cd %temp%\Redist-Installer -echo Downloading 1/3... -powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/chxseh/Redist-Installer/releases/download/latest/7za.dll', '7za.dll')" -echo Downloading 2/3... +echo Downloading 1/2... powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/chxseh/Redist-Installer/releases/download/latest/7za.exe', '7za.exe')" -echo Downloading 3/3... +echo Downloading 2/2... powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/chxseh/Redist-Installer/releases/download/latest/redists.zip', 'redists.zip')" :offlineInstall