2020-06-29 09:15:24 +00:00
|
|
|
name: Release
|
2020-06-28 13:57:33 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags: 'v*'
|
|
|
|
|
|
|
|
env:
|
2022-10-07 04:54:26 +00:00
|
|
|
GO_VERSION: 1.19.2
|
2020-06-28 13:57:33 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-04-08 19:29:09 +00:00
|
|
|
prepare-sources-with-deps:
|
|
|
|
name: Prepare sources with deps
|
|
|
|
runs-on: ubuntu-latest
|
2020-06-28 13:57:33 +00:00
|
|
|
steps:
|
2022-03-03 11:44:56 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-06-29 09:15:24 +00:00
|
|
|
- name: Set up Go
|
2022-03-03 11:44:56 +00:00
|
|
|
uses: actions/setup-go@v3
|
2020-06-28 13:57:33 +00:00
|
|
|
with:
|
2020-06-29 09:15:24 +00:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2020-06-29 09:15:24 +00:00
|
|
|
- name: Get SFTPGo version
|
2020-06-28 13:57:33 +00:00
|
|
|
id: get_version
|
2022-10-13 11:11:22 +00:00
|
|
|
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
2020-06-28 13:57:33 +00:00
|
|
|
|
|
|
|
- name: Prepare release
|
|
|
|
run: |
|
|
|
|
go mod vendor
|
|
|
|
echo "${SFTPGO_VERSION}" > VERSION.txt
|
2022-09-08 15:32:28 +00:00
|
|
|
echo "${GITHUB_SHA::8}" >> VERSION.txt
|
2020-06-28 13:57:33 +00:00
|
|
|
tar cJvf sftpgo_${SFTPGO_VERSION}_src_with_deps.tar.xz *
|
|
|
|
env:
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Upload build artifact
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-06-28 13:57:33 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_src_with_deps.tar.xz
|
|
|
|
path: ./sftpgo_${{ steps.get_version.outputs.VERSION }}_src_with_deps.tar.xz
|
|
|
|
retention-days: 1
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
prepare-window-mac:
|
|
|
|
name: Prepare binaries
|
2020-06-28 13:57:33 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-18 20:52:00 +00:00
|
|
|
os: [macos-11, windows-2022]
|
2020-06-28 13:57:33 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-03 11:44:56 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-06-29 09:15:24 +00:00
|
|
|
- name: Set up Go
|
2022-03-03 11:44:56 +00:00
|
|
|
uses: actions/setup-go@v3
|
2020-06-28 13:57:33 +00:00
|
|
|
with:
|
2020-06-29 09:15:24 +00:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2021-11-19 21:44:50 +00:00
|
|
|
- name: Get SFTPGo version
|
|
|
|
id: get_version
|
2022-10-13 11:11:22 +00:00
|
|
|
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
2021-11-19 21:44:50 +00:00
|
|
|
shell: bash
|
|
|
|
|
2021-11-20 09:48:39 +00:00
|
|
|
- name: Get OS name
|
|
|
|
id: get_os_name
|
|
|
|
run: |
|
|
|
|
if [[ $MATRIX_OS =~ ^macos.* ]]
|
|
|
|
then
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "OS=macOS" >> $GITHUB_OUTPUT
|
2021-11-20 09:48:39 +00:00
|
|
|
else
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "OS=windows" >> $GITHUB_OUTPUT
|
2021-11-20 09:48:39 +00:00
|
|
|
fi
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
MATRIX_OS: ${{ matrix.os }}
|
|
|
|
|
2021-04-20 21:00:27 +00:00
|
|
|
- name: Build for macOS x86_64
|
2020-06-28 13:57:33 +00:00
|
|
|
if: startsWith(matrix.os, 'windows-') != true
|
2022-10-02 10:43:26 +00:00
|
|
|
run: go build -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=`git describe --always --abbrev=8 --dirty` -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2021-04-20 21:00:27 +00:00
|
|
|
- name: Build for macOS arm64
|
|
|
|
if: startsWith(matrix.os, 'macos-') == true
|
2022-10-02 10:43:26 +00:00
|
|
|
run: CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 SDKROOT=$(xcrun --sdk macosx --show-sdk-path) go build -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=`git describe --always --abbrev=8 --dirty` -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo_arm64
|
2021-04-20 21:00:27 +00:00
|
|
|
|
2020-06-29 09:15:24 +00:00
|
|
|
- name: Build for Windows
|
2020-06-28 13:57:33 +00:00
|
|
|
if: startsWith(matrix.os, 'windows-')
|
|
|
|
run: |
|
2022-09-08 11:44:14 +00:00
|
|
|
$GIT_COMMIT = (git describe --always --abbrev=8 --dirty) | Out-String
|
2020-06-28 13:57:33 +00:00
|
|
|
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
2021-10-23 17:27:39 +00:00
|
|
|
$FILE_VERSION = $Env:SFTPGO_VERSION.substring(1) + ".0"
|
|
|
|
go install github.com/tc-hib/go-winres@latest
|
|
|
|
go-winres simply --arch amd64 --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
|
2022-10-02 10:43:26 +00:00
|
|
|
go build -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/internal/version.date=$DATE_TIME" -o sftpgo.exe
|
2021-11-28 17:56:30 +00:00
|
|
|
mkdir arm64
|
|
|
|
$Env:CGO_ENABLED='0'
|
|
|
|
$Env:GOOS='windows'
|
|
|
|
$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
|
2022-10-02 10:43:26 +00:00
|
|
|
go build -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/internal/version.date=$DATE_TIME" -o .\arm64\sftpgo.exe
|
2021-11-28 20:30:31 +00:00
|
|
|
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
|
2022-10-02 10:43:26 +00:00
|
|
|
go build -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/v2/internal/version.date=$DATE_TIME" -o .\x86\sftpgo.exe
|
2021-11-28 17:56:30 +00:00
|
|
|
Remove-Item Env:\CGO_ENABLED
|
|
|
|
Remove-Item Env:\GOOS
|
|
|
|
Remove-Item Env:\GOARCH
|
2021-10-23 17:27:39 +00:00
|
|
|
env:
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2020-10-10 20:29:04 +00:00
|
|
|
- name: Initialize data provider
|
|
|
|
run: ./sftpgo initprovider
|
|
|
|
shell: bash
|
|
|
|
|
2021-04-07 13:12:09 +00:00
|
|
|
- name: Prepare Release for macOS
|
|
|
|
if: startsWith(matrix.os, 'macos-')
|
2020-06-28 13:57:33 +00:00
|
|
|
run: |
|
2021-01-17 21:29:08 +00:00
|
|
|
mkdir -p output/{init,sqlite,bash_completion,zsh_completion}
|
2020-06-28 13:57:33 +00:00
|
|
|
echo "For documentation please take a look here:" > output/README.txt
|
|
|
|
echo "" >> output/README.txt
|
|
|
|
echo "https://github.com/drakkan/sftpgo/blob/${SFTPGO_VERSION}/README.md" >> output/README.txt
|
|
|
|
cp LICENSE output/
|
|
|
|
cp sftpgo output/
|
|
|
|
cp sftpgo.json output/
|
|
|
|
cp sftpgo.db output/sqlite/
|
|
|
|
cp -r static output/
|
2021-11-21 08:32:51 +00:00
|
|
|
cp -r openapi output/
|
2020-06-28 13:57:33 +00:00
|
|
|
cp -r templates output/
|
2021-04-07 13:12:09 +00:00
|
|
|
cp init/com.github.drakkan.sftpgo.plist output/init/
|
2020-10-08 14:02:04 +00:00
|
|
|
./sftpgo gen completion bash > output/bash_completion/sftpgo
|
2020-07-10 21:31:53 +00:00
|
|
|
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
|
|
|
./sftpgo gen man -d output/man/man1
|
|
|
|
gzip output/man/man1/*
|
2020-06-28 13:57:33 +00:00
|
|
|
cd output
|
2021-04-20 21:00:27 +00:00
|
|
|
tar cJvf ../sftpgo_${SFTPGO_VERSION}_${OS}_x86_64.tar.xz *
|
|
|
|
cd ..
|
|
|
|
cp sftpgo_arm64 output/sftpgo
|
|
|
|
cd output
|
|
|
|
tar cJvf ../sftpgo_${SFTPGO_VERSION}_${OS}_arm64.tar.xz *
|
2020-06-28 13:57:33 +00:00
|
|
|
cd ..
|
|
|
|
env:
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
|
|
|
OS: ${{ steps.get_os_name.outputs.OS }}
|
|
|
|
|
2020-06-29 09:15:24 +00:00
|
|
|
- name: Prepare Release for Windows
|
2020-06-28 13:57:33 +00:00
|
|
|
if: startsWith(matrix.os, 'windows-')
|
|
|
|
run: |
|
|
|
|
mkdir output
|
|
|
|
copy .\sftpgo.exe .\output
|
|
|
|
copy .\sftpgo.json .\output
|
|
|
|
copy .\sftpgo.db .\output
|
|
|
|
copy .\LICENSE .\output\LICENSE.txt
|
|
|
|
mkdir output\templates
|
|
|
|
xcopy .\templates .\output\templates\ /E
|
|
|
|
mkdir output\static
|
|
|
|
xcopy .\static .\output\static\ /E
|
2021-11-21 08:32:51 +00:00
|
|
|
mkdir output\openapi
|
|
|
|
xcopy .\openapi .\output\openapi\ /E
|
2021-11-19 21:44:50 +00:00
|
|
|
$CERT_PATH=(Get-Location -PSProvider FileSystem).ProviderPath + "\cert.pfx"
|
|
|
|
[IO.File]::WriteAllBytes($CERT_PATH,[System.Convert]::FromBase64String($Env:CERT_DATA))
|
|
|
|
certutil -f -p "$Env:CERT_PASS" -importpfx MY "$CERT_PATH"
|
|
|
|
rm "$CERT_PATH"
|
2022-03-18 20:52:00 +00:00
|
|
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.20348.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.20348.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.20348.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.20348.0/x86/signtool.exe$q sign /sm /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n $qNicola Murino$q /d $qSFTPGo$q $f'
|
2021-11-21 08:32:51 +00:00
|
|
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
2021-11-28 17:56:30 +00:00
|
|
|
|
|
|
|
rm .\output\sftpgo.exe
|
|
|
|
rm .\output\sftpgo.db
|
|
|
|
copy .\arm64\sftpgo.exe .\output
|
|
|
|
(Get-Content .\output\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\output\sftpgo.json
|
|
|
|
$Env:SFTPGO_DATA_PROVIDER__DRIVER='bolt'
|
|
|
|
$Env:SFTPGO_DATA_PROVIDER__NAME='.\output\sftpgo.db'
|
|
|
|
.\sftpgo.exe initprovider
|
|
|
|
Remove-Item Env:\SFTPGO_DATA_PROVIDER__DRIVER
|
|
|
|
Remove-Item Env:\SFTPGO_DATA_PROVIDER__NAME
|
|
|
|
$Env:SFTPGO_ISS_ARCH='arm64'
|
|
|
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
2021-11-28 20:30:31 +00:00
|
|
|
|
|
|
|
rm .\output\sftpgo.exe
|
|
|
|
copy .\x86\sftpgo.exe .\output
|
|
|
|
$Env:SFTPGO_ISS_ARCH='x86'
|
|
|
|
iscc "$INNO_S" .\windows-installer\sftpgo.iss
|
2021-11-21 08:32:51 +00:00
|
|
|
certutil -delstore MY "Nicola Murino"
|
|
|
|
env:
|
|
|
|
SFTPGO_ISS_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
|
|
|
SFTPGO_ISS_DOC_URL: https://github.com/drakkan/sftpgo/blob/${{ steps.get_version.outputs.VERSION }}/README.md
|
|
|
|
CERT_DATA: ${{ secrets.CERT_DATA }}
|
|
|
|
CERT_PASS: ${{ secrets.CERT_PASS }}
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2021-11-21 08:32:51 +00:00
|
|
|
- name: Prepare Portable Release for Windows
|
|
|
|
if: startsWith(matrix.os, 'windows-')
|
|
|
|
run: |
|
2021-01-17 21:29:08 +00:00
|
|
|
mkdir win-portable
|
2020-07-10 21:31:53 +00:00
|
|
|
copy .\sftpgo.exe .\win-portable
|
2021-11-28 17:56:30 +00:00
|
|
|
mkdir win-portable\arm64
|
2021-11-28 20:30:31 +00:00
|
|
|
copy .\arm64\sftpgo.exe .\win-portable\arm64
|
|
|
|
mkdir win-portable\x86
|
|
|
|
copy .\x86\sftpgo.exe .\win-portable\x86
|
2020-07-10 21:31:53 +00:00
|
|
|
copy .\sftpgo.json .\win-portable
|
2021-11-28 17:56:30 +00:00
|
|
|
(Get-Content .\win-portable\sftpgo.json).replace('"sqlite"', '"bolt"') | Set-Content .\win-portable\sftpgo.json
|
|
|
|
copy .\output\sftpgo.db .\win-portable
|
2020-07-10 21:31:53 +00:00
|
|
|
copy .\LICENSE .\win-portable\LICENSE.txt
|
|
|
|
mkdir win-portable\templates
|
|
|
|
xcopy .\templates .\win-portable\templates\ /E
|
|
|
|
mkdir win-portable\static
|
|
|
|
xcopy .\static .\win-portable\static\ /E
|
2021-11-21 08:32:51 +00:00
|
|
|
mkdir win-portable\openapi
|
|
|
|
xcopy .\openapi .\win-portable\openapi\ /E
|
2021-11-28 17:56:30 +00:00
|
|
|
Compress-Archive .\win-portable\* sftpgo_portable.zip
|
2020-07-10 21:31:53 +00:00
|
|
|
|
2021-04-20 21:00:27 +00:00
|
|
|
- name: Upload macOS x86_64 artifact
|
2021-04-07 13:12:09 +00:00
|
|
|
if: startsWith(matrix.os, 'macos-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-06-28 13:57:33 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86_64.tar.xz
|
2021-04-20 21:00:27 +00:00
|
|
|
path: ./sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86_64.tar.xz
|
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
- name: Upload macOS arm64 artifact
|
|
|
|
if: startsWith(matrix.os, 'macos-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-20 21:00:27 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_arm64.tar.xz
|
|
|
|
path: ./sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_arm64.tar.xz
|
2021-04-08 19:29:09 +00:00
|
|
|
retention-days: 1
|
2020-06-28 13:57:33 +00:00
|
|
|
|
2021-11-28 17:56:30 +00:00
|
|
|
- name: Upload Windows installer x86_64 artifact
|
2020-06-28 13:57:33 +00:00
|
|
|
if: startsWith(matrix.os, 'windows-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-06-28 13:57:33 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86_64.exe
|
|
|
|
path: ./sftpgo_windows_x86_64.exe
|
|
|
|
retention-days: 1
|
2020-07-10 21:31:53 +00:00
|
|
|
|
2021-11-28 17:56:30 +00:00
|
|
|
- name: Upload Windows installer arm64 artifact
|
|
|
|
if: startsWith(matrix.os, 'windows-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-28 17:56:30 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_arm64.exe
|
|
|
|
path: ./sftpgo_windows_arm64.exe
|
|
|
|
retention-days: 1
|
|
|
|
|
2021-11-28 20:30:31 +00:00
|
|
|
- name: Upload Windows installer x86 artifact
|
|
|
|
if: startsWith(matrix.os, 'windows-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-28 20:30:31 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86.exe
|
|
|
|
path: ./sftpgo_windows_x86.exe
|
|
|
|
retention-days: 1
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Upload Windows portable artifact
|
2020-07-10 21:31:53 +00:00
|
|
|
if: startsWith(matrix.os, 'windows-')
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-07-10 21:31:53 +00:00
|
|
|
with:
|
2021-11-28 17:56:30 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_portable.zip
|
|
|
|
path: ./sftpgo_portable.zip
|
2021-04-08 19:29:09 +00:00
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
prepare-linux:
|
|
|
|
name: Prepare Linux binaries
|
2022-09-08 07:42:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-04-07 13:12:09 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- arch: amd64
|
2022-09-08 07:42:36 +00:00
|
|
|
distro: ubuntu:18.04
|
2021-04-07 13:12:09 +00:00
|
|
|
go-arch: amd64
|
|
|
|
deb-arch: amd64
|
|
|
|
rpm-arch: x86_64
|
|
|
|
tar-arch: x86_64
|
|
|
|
- arch: aarch64
|
|
|
|
distro: ubuntu18.04
|
|
|
|
go-arch: arm64
|
|
|
|
deb-arch: arm64
|
|
|
|
rpm-arch: aarch64
|
|
|
|
tar-arch: arm64
|
|
|
|
- arch: ppc64le
|
|
|
|
distro: ubuntu18.04
|
|
|
|
go-arch: ppc64le
|
|
|
|
deb-arch: ppc64el
|
|
|
|
rpm-arch: ppc64le
|
|
|
|
tar-arch: ppc64le
|
2021-09-25 12:14:21 +00:00
|
|
|
- arch: armv7
|
|
|
|
distro: ubuntu18.04
|
2021-11-14 15:23:33 +00:00
|
|
|
go-arch: arm7
|
2021-09-25 12:14:21 +00:00
|
|
|
deb-arch: armhf
|
2021-11-14 15:23:33 +00:00
|
|
|
rpm-arch: armv7hl
|
2021-09-25 12:14:21 +00:00
|
|
|
tar-arch: armv7
|
2021-04-07 13:12:09 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-03 11:44:56 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-09-26 12:07:24 +00:00
|
|
|
|
2021-04-07 13:12:09 +00:00
|
|
|
- name: Get versions
|
|
|
|
id: get_version
|
|
|
|
run: |
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "SFTPGO_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
|
|
|
echo "GO_VERSION=${GO_VERSION}" >> $GITHUB_OUTPUT
|
|
|
|
echo "COMMIT=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
|
2021-04-07 13:12:09 +00:00
|
|
|
shell: bash
|
2020-09-26 12:07:24 +00:00
|
|
|
env:
|
2021-04-07 13:12:09 +00:00
|
|
|
GO_VERSION: ${{ env.GO_VERSION }}
|
|
|
|
|
|
|
|
- name: Build on amd64
|
|
|
|
if: ${{ matrix.arch == 'amd64' }}
|
|
|
|
run: |
|
2022-09-08 07:42:36 +00:00
|
|
|
echo '#!/bin/bash' > build.sh
|
|
|
|
echo '' >> build.sh
|
|
|
|
echo 'set -e' >> build.sh
|
|
|
|
echo 'apt-get update -q -y' >> build.sh
|
|
|
|
echo 'apt-get install -q -y curl gcc' >> build.sh
|
|
|
|
echo 'curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://go.dev/dl/go${{ steps.get_version.outputs.GO_VERSION }}.linux-${{ matrix.go-arch }}.tar.gz' >> build.sh
|
|
|
|
echo 'tar -C /usr/local -xzf go.tar.gz' >> build.sh
|
|
|
|
echo 'export PATH=$PATH:/usr/local/go/bin' >> build.sh
|
|
|
|
echo 'go version' >> build.sh
|
|
|
|
echo 'cd /usr/local/src' >> build.sh
|
2022-10-02 10:43:26 +00:00
|
|
|
echo 'go build -buildvcs=false -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=${{ steps.get_version.outputs.COMMIT }} -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo' >> build.sh
|
2022-09-08 07:42:36 +00:00
|
|
|
|
|
|
|
chmod 755 build.sh
|
|
|
|
docker run --rm --name ubuntu-build --mount type=bind,source=`pwd`,target=/usr/local/src ${{ matrix.distro }} /usr/local/src/build.sh
|
2021-04-07 13:12:09 +00:00
|
|
|
mkdir -p output/{init,sqlite,bash_completion,zsh_completion}
|
|
|
|
echo "For documentation please take a look here:" > output/README.txt
|
|
|
|
echo "" >> output/README.txt
|
|
|
|
echo "https://github.com/drakkan/sftpgo/blob/${SFTPGO_VERSION}/README.md" >> output/README.txt
|
|
|
|
cp LICENSE output/
|
|
|
|
cp sftpgo.json output/
|
|
|
|
cp -r templates output/
|
|
|
|
cp -r static output/
|
2021-11-21 08:32:51 +00:00
|
|
|
cp -r openapi output/
|
2021-04-07 13:12:09 +00:00
|
|
|
cp init/sftpgo.service output/init/
|
|
|
|
./sftpgo initprovider
|
|
|
|
./sftpgo gen completion bash > output/bash_completion/sftpgo
|
|
|
|
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
|
|
|
./sftpgo gen man -d output/man/man1
|
|
|
|
gzip output/man/man1/*
|
|
|
|
cp sftpgo output/
|
|
|
|
cp sftpgo.db output/sqlite/
|
|
|
|
cd output
|
|
|
|
tar cJvf sftpgo_${SFTPGO_VERSION}_linux_${{ matrix.tar-arch }}.tar.xz *
|
|
|
|
cd ..
|
|
|
|
env:
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.SFTPGO_VERSION }}
|
|
|
|
|
2022-03-24 21:03:17 +00:00
|
|
|
- uses: uraimo/run-on-arch-action@v2
|
2021-04-07 13:12:09 +00:00
|
|
|
if: ${{ matrix.arch != 'amd64' }}
|
|
|
|
name: Build for ${{ matrix.arch }}
|
|
|
|
id: build
|
2020-09-26 12:07:24 +00:00
|
|
|
with:
|
2021-04-07 13:12:09 +00:00
|
|
|
arch: ${{ matrix.arch }}
|
|
|
|
distro: ${{ matrix.distro }}
|
|
|
|
setup: |
|
|
|
|
mkdir -p "${PWD}/output"
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}/output:/output"
|
|
|
|
shell: /bin/bash
|
|
|
|
install: |
|
|
|
|
apt-get update -q -y
|
2022-09-03 14:29:07 +00:00
|
|
|
apt-get install -q -y curl gcc xz-utils
|
2021-09-25 12:14:21 +00:00
|
|
|
GO_DOWNLOAD_ARCH=${{ matrix.go-arch }}
|
|
|
|
if [ ${{ matrix.arch}} == 'armv7' ]
|
|
|
|
then
|
|
|
|
GO_DOWNLOAD_ARCH=armv6l
|
|
|
|
fi
|
2021-11-24 10:27:32 +00:00
|
|
|
curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://go.dev/dl/go${{ steps.get_version.outputs.GO_VERSION }}.linux-${GO_DOWNLOAD_ARCH}.tar.gz
|
2021-04-07 13:12:09 +00:00
|
|
|
tar -C /usr/local -xzf go.tar.gz
|
|
|
|
run: |
|
|
|
|
export PATH=$PATH:/usr/local/go/bin
|
2022-09-08 07:42:36 +00:00
|
|
|
go version
|
2022-10-02 10:43:26 +00:00
|
|
|
go build -buildvcs=false -trimpath -tags nopgxregisterdefaulttypes -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=${{ steps.get_version.outputs.COMMIT }} -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo
|
2021-04-07 13:12:09 +00:00
|
|
|
mkdir -p output/{init,sqlite,bash_completion,zsh_completion}
|
|
|
|
echo "For documentation please take a look here:" > output/README.txt
|
|
|
|
echo "" >> output/README.txt
|
|
|
|
echo "https://github.com/drakkan/sftpgo/blob/${{ steps.get_version.outputs.SFTPGO_VERSION }}/README.md" >> output/README.txt
|
|
|
|
cp LICENSE output/
|
|
|
|
cp sftpgo.json output/
|
|
|
|
cp -r templates output/
|
|
|
|
cp -r static output/
|
2021-11-21 08:32:51 +00:00
|
|
|
cp -r openapi output/
|
2021-04-07 13:12:09 +00:00
|
|
|
cp init/sftpgo.service output/init/
|
|
|
|
./sftpgo initprovider
|
|
|
|
./sftpgo gen completion bash > output/bash_completion/sftpgo
|
|
|
|
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
|
|
|
./sftpgo gen man -d output/man/man1
|
|
|
|
gzip output/man/man1/*
|
|
|
|
cp sftpgo output/
|
|
|
|
cp sftpgo.db output/sqlite/
|
|
|
|
cd output
|
|
|
|
tar cJvf sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_${{ matrix.tar-arch }}.tar.xz *
|
|
|
|
cd ..
|
2020-11-08 05:14:03 +00:00
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Upload build artifact for ${{ matrix.arch }}
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_${{ matrix.tar-arch }}.tar.xz
|
|
|
|
path: ./output/sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_${{ matrix.tar-arch }}.tar.xz
|
|
|
|
retention-days: 1
|
|
|
|
|
2021-04-07 13:12:09 +00:00
|
|
|
- name: Build Packages
|
|
|
|
id: build_linux_pkgs
|
|
|
|
run: |
|
|
|
|
export NFPM_ARCH=${{ matrix.go-arch }}
|
|
|
|
cd pkgs
|
|
|
|
./build.sh
|
|
|
|
PKG_VERSION=${SFTPGO_VERSION:1}
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "pkg-version=${PKG_VERSION}" >> $GITHUB_OUTPUT
|
2020-11-08 05:14:03 +00:00
|
|
|
env:
|
2021-04-07 13:12:09 +00:00
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.SFTPGO_VERSION }}
|
|
|
|
|
|
|
|
- name: Upload Deb Package
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-09 17:39:36 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.build_linux_pkgs.outputs.pkg-version }}-1_${{ matrix.deb-arch}}.deb
|
|
|
|
path: ./pkgs/dist/deb/sftpgo_${{ steps.build_linux_pkgs.outputs.pkg-version }}-1_${{ matrix.deb-arch}}.deb
|
|
|
|
retention-days: 1
|
2020-11-09 17:39:36 +00:00
|
|
|
|
2021-04-07 13:12:09 +00:00
|
|
|
- name: Upload RPM Package
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-09 17:39:36 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.${{ matrix.rpm-arch}}.rpm
|
|
|
|
path: ./pkgs/dist/rpm/sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.${{ matrix.rpm-arch}}.rpm
|
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
prepare-linux-bundle:
|
|
|
|
name: Prepare Linux bundle
|
|
|
|
needs: prepare-linux
|
2021-04-08 06:38:51 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Get versions
|
|
|
|
id: get_version
|
|
|
|
run: |
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "SFTPGO_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
2021-04-08 06:38:51 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Download amd64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_x86_64.tar.xz
|
|
|
|
|
|
|
|
- name: Download arm64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_arm64.tar.xz
|
|
|
|
|
|
|
|
- name: Download ppc64le artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
|
|
|
|
2021-09-25 12:14:21 +00:00
|
|
|
- name: Download armv7 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-09-25 12:14:21 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_armv7.tar.xz
|
|
|
|
|
2021-04-08 06:38:51 +00:00
|
|
|
- name: Build bundle
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-09-25 12:14:21 +00:00
|
|
|
mkdir -p bundle/{arm64,ppc64le,armv7}
|
2021-04-08 06:38:51 +00:00
|
|
|
cd bundle
|
|
|
|
tar xvf ../sftpgo_${SFTPGO_VERSION}_linux_x86_64.tar.xz
|
|
|
|
cd arm64
|
|
|
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_arm64.tar.xz sftpgo
|
|
|
|
cd ../ppc64le
|
|
|
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_ppc64le.tar.xz sftpgo
|
2021-09-25 12:14:21 +00:00
|
|
|
cd ../armv7
|
|
|
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_armv7.tar.xz sftpgo
|
2021-04-08 06:38:51 +00:00
|
|
|
cd ..
|
|
|
|
tar cJvf sftpgo_${SFTPGO_VERSION}_linux_bundle.tar.xz *
|
|
|
|
cd ..
|
|
|
|
env:
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.SFTPGO_VERSION }}
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Upload Linux bundle
|
2022-03-24 09:21:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_bundle.tar.xz
|
|
|
|
path: ./bundle/sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_bundle.tar.xz
|
|
|
|
retention-days: 1
|
2021-04-08 06:38:51 +00:00
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
create-release:
|
|
|
|
name: Release
|
|
|
|
needs: [prepare-linux-bundle, prepare-sources-with-deps, prepare-window-mac]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-03-03 11:44:56 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Get versions
|
|
|
|
id: get_version
|
2021-04-08 06:38:51 +00:00
|
|
|
run: |
|
2021-04-08 19:29:09 +00:00
|
|
|
SFTPGO_VERSION=${GITHUB_REF/refs\/tags\//}
|
|
|
|
PKG_VERSION=${SFTPGO_VERSION:1}
|
2022-10-13 11:11:22 +00:00
|
|
|
echo "SFTPGO_VERSION=${SFTPGO_VERSION}" >> $GITHUB_OUTPUT
|
|
|
|
echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT
|
2021-04-08 06:38:51 +00:00
|
|
|
shell: bash
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Download amd64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_x86_64.tar.xz
|
|
|
|
|
|
|
|
- name: Download arm64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_arm64.tar.xz
|
|
|
|
|
|
|
|
- name: Download ppc64le artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 06:38:51 +00:00
|
|
|
with:
|
2021-04-08 19:29:09 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
|
|
|
|
2021-09-25 12:14:21 +00:00
|
|
|
- name: Download armv7 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-09-25 12:14:21 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_armv7.tar.xz
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Download Linux bundle artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_bundle.tar.xz
|
|
|
|
|
|
|
|
- name: Download Deb amd64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_amd64.deb
|
|
|
|
|
|
|
|
- name: Download Deb arm64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_arm64.deb
|
|
|
|
|
|
|
|
- name: Download Deb ppc64le artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_ppc64el.deb
|
|
|
|
|
2021-09-25 12:14:21 +00:00
|
|
|
- name: Download Deb armv7 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-09-25 12:14:21 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_armhf.deb
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Download RPM x86_64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.x86_64.rpm
|
|
|
|
|
|
|
|
- name: Download RPM aarch64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.aarch64.rpm
|
|
|
|
|
|
|
|
- name: Download RPM ppc64le artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.ppc64le.rpm
|
|
|
|
|
2021-09-25 12:14:21 +00:00
|
|
|
- name: Download RPM armv7 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-09-25 12:14:21 +00:00
|
|
|
with:
|
2021-11-20 09:48:39 +00:00
|
|
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.armv7hl.rpm
|
2021-09-25 12:14:21 +00:00
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Download macOS x86_64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_macOS_x86_64.tar.xz
|
|
|
|
|
2021-04-20 21:00:27 +00:00
|
|
|
- name: Download macOS arm64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-20 21:00:27 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_macOS_arm64.tar.xz
|
|
|
|
|
2021-04-08 19:29:09 +00:00
|
|
|
- name: Download Windows installer x86_64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_x86_64.exe
|
|
|
|
|
2021-11-28 17:56:30 +00:00
|
|
|
- name: Download Windows installer arm64 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-11-28 17:56:30 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_arm64.exe
|
|
|
|
|
2021-11-28 20:30:31 +00:00
|
|
|
- name: Download Windows installer x86 artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-11-28 20:30:31 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_x86.exe
|
|
|
|
|
2021-11-28 17:56:30 +00:00
|
|
|
- name: Download Windows portable artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
2021-11-28 17:56:30 +00:00
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_windows_portable.zip
|
2021-04-08 19:29:09 +00:00
|
|
|
|
|
|
|
- name: Download source with deps artifact
|
2022-04-11 07:24:09 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-04-08 19:29:09 +00:00
|
|
|
with:
|
|
|
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_src_with_deps.tar.xz
|
|
|
|
|
|
|
|
- name: Create release
|
|
|
|
run: |
|
|
|
|
mv sftpgo_windows_x86_64.exe sftpgo_${SFTPGO_VERSION}_windows_x86_64.exe
|
2021-11-28 17:56:30 +00:00
|
|
|
mv sftpgo_windows_arm64.exe sftpgo_${SFTPGO_VERSION}_windows_arm64.exe
|
2021-11-28 20:30:31 +00:00
|
|
|
mv sftpgo_windows_x86.exe sftpgo_${SFTPGO_VERSION}_windows_x86.exe
|
2021-11-28 17:56:30 +00:00
|
|
|
mv sftpgo_portable.zip sftpgo_${SFTPGO_VERSION}_windows_portable.zip
|
2021-04-10 07:40:02 +00:00
|
|
|
gh release create "${SFTPGO_VERSION}" -t "${SFTPGO_VERSION}"
|
2021-04-08 19:29:09 +00:00
|
|
|
gh release upload "${SFTPGO_VERSION}" sftpgo_*.xz --clobber
|
|
|
|
gh release upload "${SFTPGO_VERSION}" sftpgo-*.rpm --clobber
|
|
|
|
gh release upload "${SFTPGO_VERSION}" sftpgo_*.deb --clobber
|
|
|
|
gh release upload "${SFTPGO_VERSION}" sftpgo_*.exe --clobber
|
|
|
|
gh release upload "${SFTPGO_VERSION}" sftpgo_*.zip --clobber
|
|
|
|
gh release view "${SFTPGO_VERSION}"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.SFTPGO_VERSION }}
|