mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
CI: add windows x86
there still seem to be people using x86 on Windows ...
This commit is contained in:
parent
c330ac8418
commit
bec54ac8ae
4 changed files with 54 additions and 3 deletions
19
.github/workflows/development.yml
vendored
19
.github/workflows/development.yml
vendored
|
@ -64,6 +64,10 @@ jobs:
|
||||||
$Env:GOARCH='arm64'
|
$Env:GOARCH='arm64'
|
||||||
go-winres simply --arch arm64 --product-version $LATEST_TAG-dev-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
go-winres simply --arch arm64 --product-version $LATEST_TAG-dev-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
||||||
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\arm64\sftpgo.exe
|
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\arm64\sftpgo.exe
|
||||||
|
mkdir x86
|
||||||
|
$Env:GOARCH='386'
|
||||||
|
go-winres simply --arch 386 --product-version $LATEST_TAG-dev-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
||||||
|
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\x86\sftpgo.exe
|
||||||
Remove-Item Env:\CGO_ENABLED
|
Remove-Item Env:\CGO_ENABLED
|
||||||
Remove-Item Env:\GOOS
|
Remove-Item Env:\GOOS
|
||||||
Remove-Item Env:\GOARCH
|
Remove-Item Env:\GOARCH
|
||||||
|
@ -139,6 +143,7 @@ jobs:
|
||||||
rm "$CERT_PATH"
|
rm "$CERT_PATH"
|
||||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\sftpgo.exe
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\sftpgo.exe
|
||||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\arm64\sftpgo.exe
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\arm64\sftpgo.exe
|
||||||
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\x86\sftpgo.exe
|
||||||
$INNO_S='/Ssigntool=$qC:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe$q sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n $qNicola Murino$q /d $qSFTPGo$q $f'
|
$INNO_S='/Ssigntool=$qC:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe$q sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n $qNicola Murino$q /d $qSFTPGo$q $f'
|
||||||
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
|
|
||||||
|
@ -153,6 +158,11 @@ jobs:
|
||||||
Remove-Item Env:\SFTPGO_DATA_PROVIDER__NAME
|
Remove-Item Env:\SFTPGO_DATA_PROVIDER__NAME
|
||||||
$Env:SFTPGO_ISS_ARCH='arm64'
|
$Env:SFTPGO_ISS_ARCH='arm64'
|
||||||
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
|
|
||||||
|
rm .\output\sftpgo.exe
|
||||||
|
copy .\x86\sftpgo.exe .\output
|
||||||
|
$Env:SFTPGO_ISS_ARCH='x86'
|
||||||
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
certutil -delstore MY "Nicola Murino"
|
certutil -delstore MY "Nicola Murino"
|
||||||
env:
|
env:
|
||||||
CERT_DATA: ${{ secrets.CERT_DATA }}
|
CERT_DATA: ${{ secrets.CERT_DATA }}
|
||||||
|
@ -172,6 +182,13 @@ jobs:
|
||||||
name: sftpgo_windows_installer_arm64
|
name: sftpgo_windows_installer_arm64
|
||||||
path: ./sftpgo_windows_arm64.exe
|
path: ./sftpgo_windows_arm64.exe
|
||||||
|
|
||||||
|
- name: Upload Windows installer x86 artifact
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') && github.event_name != 'pull_request' }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_windows_installer_x86
|
||||||
|
path: ./sftpgo_windows_x86.exe
|
||||||
|
|
||||||
- name: Prepare build artifact for Windows
|
- name: Prepare build artifact for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
|
@ -180,6 +197,8 @@ jobs:
|
||||||
copy .\sftpgo.exe .\output
|
copy .\sftpgo.exe .\output
|
||||||
mkdir output\arm64
|
mkdir output\arm64
|
||||||
copy .\arm64\sftpgo.exe .\output\arm64
|
copy .\arm64\sftpgo.exe .\output\arm64
|
||||||
|
mkdir output\x86
|
||||||
|
copy .\x86\sftpgo.exe .\output\x86
|
||||||
copy .\sftpgo.json .\output
|
copy .\sftpgo.json .\output
|
||||||
(Get-Content .\output\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\output\sftpgo.json
|
(Get-Content .\output\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\output\sftpgo.json
|
||||||
mkdir output\templates
|
mkdir output\templates
|
||||||
|
|
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
|
@ -92,6 +92,10 @@ jobs:
|
||||||
$Env:GOARCH='arm64'
|
$Env:GOARCH='arm64'
|
||||||
go-winres simply --arch arm64 --product-version $Env:SFTPGO_VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
go-winres simply --arch arm64 --product-version $Env:SFTPGO_VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
||||||
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\arm64\sftpgo.exe
|
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\arm64\sftpgo.exe
|
||||||
|
mkdir x86
|
||||||
|
$Env:GOARCH='386'
|
||||||
|
go-winres simply --arch 386 --product-version $Env:SFTPGO_VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo server" --product-name SFTPGo --copyright "AGPL-3.0" --original-filename sftpgo.exe --icon .\windows-installer\icon.ico
|
||||||
|
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/version.date=$DATE_TIME" -o .\x86\sftpgo.exe
|
||||||
Remove-Item Env:\CGO_ENABLED
|
Remove-Item Env:\CGO_ENABLED
|
||||||
Remove-Item Env:\GOOS
|
Remove-Item Env:\GOOS
|
||||||
Remove-Item Env:\GOARCH
|
Remove-Item Env:\GOARCH
|
||||||
|
@ -152,6 +156,7 @@ jobs:
|
||||||
rm "$CERT_PATH"
|
rm "$CERT_PATH"
|
||||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\sftpgo.exe
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\sftpgo.exe
|
||||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\arm64\sftpgo.exe
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\arm64\sftpgo.exe
|
||||||
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "Nicola Murino" /d "SFTPGo" .\x86\sftpgo.exe
|
||||||
$INNO_S='/Ssigntool=$qC:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe$q sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n $qNicola Murino$q /d $qSFTPGo$q $f'
|
$INNO_S='/Ssigntool=$qC:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe$q sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n $qNicola Murino$q /d $qSFTPGo$q $f'
|
||||||
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
|
|
||||||
|
@ -166,6 +171,11 @@ jobs:
|
||||||
Remove-Item Env:\SFTPGO_DATA_PROVIDER__NAME
|
Remove-Item Env:\SFTPGO_DATA_PROVIDER__NAME
|
||||||
$Env:SFTPGO_ISS_ARCH='arm64'
|
$Env:SFTPGO_ISS_ARCH='arm64'
|
||||||
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
|
|
||||||
|
rm .\output\sftpgo.exe
|
||||||
|
copy .\x86\sftpgo.exe .\output
|
||||||
|
$Env:SFTPGO_ISS_ARCH='x86'
|
||||||
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
||||||
certutil -delstore MY "Nicola Murino"
|
certutil -delstore MY "Nicola Murino"
|
||||||
env:
|
env:
|
||||||
SFTPGO_ISS_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
SFTPGO_ISS_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
@ -179,7 +189,9 @@ jobs:
|
||||||
mkdir win-portable
|
mkdir win-portable
|
||||||
copy .\sftpgo.exe .\win-portable
|
copy .\sftpgo.exe .\win-portable
|
||||||
mkdir win-portable\arm64
|
mkdir win-portable\arm64
|
||||||
copy .\arm64\sftpgo.exe .\win-portable\arm64\sftpgo.exe
|
copy .\arm64\sftpgo.exe .\win-portable\arm64
|
||||||
|
mkdir win-portable\x86
|
||||||
|
copy .\x86\sftpgo.exe .\win-portable\x86
|
||||||
copy .\sftpgo.json .\win-portable
|
copy .\sftpgo.json .\win-portable
|
||||||
(Get-Content .\win-portable\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\win-portable\sftpgo.json
|
(Get-Content .\win-portable\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\win-portable\sftpgo.json
|
||||||
copy .\output\sftpgo.db .\win-portable
|
copy .\output\sftpgo.db .\win-portable
|
||||||
|
@ -224,6 +236,14 @@ jobs:
|
||||||
path: ./sftpgo_windows_arm64.exe
|
path: ./sftpgo_windows_arm64.exe
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Upload Windows installer x86 artifact
|
||||||
|
if: startsWith(matrix.os, 'windows-')
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86.exe
|
||||||
|
path: ./sftpgo_windows_x86.exe
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
- name: Upload Windows portable artifact
|
- name: Upload Windows portable artifact
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -542,6 +562,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_arm64.exe
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_arm64.exe
|
||||||
|
|
||||||
|
- name: Download Windows installer x86 artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_x86.exe
|
||||||
|
|
||||||
- name: Download Windows portable artifact
|
- name: Download Windows portable artifact
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -556,6 +581,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mv sftpgo_windows_x86_64.exe sftpgo_${SFTPGO_VERSION}_windows_x86_64.exe
|
mv sftpgo_windows_x86_64.exe sftpgo_${SFTPGO_VERSION}_windows_x86_64.exe
|
||||||
mv sftpgo_windows_arm64.exe sftpgo_${SFTPGO_VERSION}_windows_arm64.exe
|
mv sftpgo_windows_arm64.exe sftpgo_${SFTPGO_VERSION}_windows_arm64.exe
|
||||||
|
mv sftpgo_windows_x86.exe sftpgo_${SFTPGO_VERSION}_windows_x86.exe
|
||||||
mv sftpgo_portable.zip sftpgo_${SFTPGO_VERSION}_windows_portable.zip
|
mv sftpgo_portable.zip sftpgo_${SFTPGO_VERSION}_windows_portable.zip
|
||||||
gh release create "${SFTPGO_VERSION}" -t "${SFTPGO_VERSION}"
|
gh release create "${SFTPGO_VERSION}" -t "${SFTPGO_VERSION}"
|
||||||
gh release upload "${SFTPGO_VERSION}" sftpgo_*.xz --clobber
|
gh release upload "${SFTPGO_VERSION}" sftpgo_*.xz --clobber
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NFPM_VERSION=2.9.2
|
NFPM_VERSION=2.10.0
|
||||||
NFPM_ARCH=${NFPM_ARCH:-amd64}
|
NFPM_ARCH=${NFPM_ARCH:-amd64}
|
||||||
if [ -z ${SFTPGO_VERSION} ]
|
if [ -z ${SFTPGO_VERSION} ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
#if GetEnv("SFTPGO_ISS_ARCH") != ""
|
#if GetEnv("SFTPGO_ISS_ARCH") != ""
|
||||||
#define MyAppArch GetEnv("SFTPGO_ISS_ARCH")
|
#define MyAppArch GetEnv("SFTPGO_ISS_ARCH")
|
||||||
#define MySetupName "sftpgo_windows_" + MyAppArch
|
#define MySetupName "sftpgo_windows_" + MyAppArch
|
||||||
|
#if MyAppArch == "x86"
|
||||||
|
#define MyAppArch64 ""
|
||||||
|
#else
|
||||||
|
#define MyAppArch64 GetEnv("SFTPGO_ISS_ARCH")
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MyAppArch "x64"
|
#define MyAppArch "x64"
|
||||||
|
#define MyAppArch64 "x64"
|
||||||
#define MySetupName "sftpgo_windows_x86_64"
|
#define MySetupName "sftpgo_windows_x86_64"
|
||||||
#endif
|
#endif
|
||||||
#define MyAppURL "https://github.com/drakkan/sftpgo"
|
#define MyAppURL "https://github.com/drakkan/sftpgo"
|
||||||
|
@ -41,7 +47,7 @@ SetupIconFile=icon.ico
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
UninstallDisplayIcon={app}\sftpgo.exe
|
UninstallDisplayIcon={app}\sftpgo.exe
|
||||||
WizardStyle=modern
|
WizardStyle=modern
|
||||||
ArchitecturesInstallIn64BitMode={#MyAppArch}
|
ArchitecturesInstallIn64BitMode={#MyAppArch64}
|
||||||
PrivilegesRequired=admin
|
PrivilegesRequired=admin
|
||||||
ArchitecturesAllowed={#MyAppArch}
|
ArchitecturesAllowed={#MyAppArch}
|
||||||
MinVersion=6.1sp1
|
MinVersion=6.1sp1
|
||||||
|
|
Loading…
Reference in a new issue