Skip to content

Package kDrive desktop on all platforms #38

Package kDrive desktop on all platforms

Package kDrive desktop on all platforms #38

Workflow file for this run

name: Package kDrive desktop on all platforms
on:
push:
branches:
- 'RELEASE-**'
workflow_dispatch:
concurrency:
group: packaging
cancel-in-progress: true
env:
KDRIVE_TOKEN: ${{ secrets.KDRIVE_TOKEN }}
KDRIVE_ID: ${{ secrets.KDRIVE_ID }}
KDRIVE_DIR_ID: ${{ secrets.KDRIVE_DIR_ID }}
ALTOOL_USERNAME: ${{ secrets.ALTOOL_USERNAME }}
jobs:
package-Windows:
runs-on: [ self-hosted, Windows, desktop-kDrive ]
env:
BRANCH_NAME: ${{ github.ref_name || inputs.BRANCH }}
steps:
- name: Checkout the PR
uses: actions/checkout@v4.1.1
with:
ref: ${{ env.BRANCH_NAME }} # actions/checkout might not access wildcards, this needs to be tested by having the workflow in a RELEASE branch.
submodules: recursive
- name: Restore extension packages
run : nuget restore extensions/windows/cfapi/kDriveExt.sln
- name: Import Windows virtual certificate
env:
WINDOWS_VIRTUAL_CERT: ${{ secrets.WINDOWS_VIRTUAL_CERT }}
WINDOWS_VIRTUAL_CERT_PASSWORD: ${{ secrets.WINDOWS_VIRTUAL_CERT_PASSWORD }}
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_VIRTUAL_CERT
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
Remove-Item -path certificate -include tempCert.txt
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_VIRTUAL_CERT_PASSWORD -Force -AsPlainText)
- name: Build and package kDrive desktop
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars64.bat"
powershell ./infomaniak-build-tools/windows/build-drive.ps1
shell: cmd
- name: Upload to kDrive
run: powershell ./infomaniak-build-tools/windows/upload-ci.ps1
- name: Clean-up generated code
run : powershell ./infomaniak-build-tools/windows/build-drive.ps1 -clean all
package-Linux:
runs-on: [ self-hosted, Linux, X64, desktop-kdrive ]
env:
BRANCH_NAME: ${{ github.ref_name || inputs.BRANCH }}
steps:
- name: Checkout the PR
uses: actions/checkout@v4.1.1
with:
ref: ${{ env.BRANCH_NAME }}
submodules: recursive
- name: Grant building script execute permission
run : chmod +x ./infomaniak-build-tools/linux/build-ci-amd64.sh
- name: Build kDrive desktop
run : ./infomaniak-build-tools/linux/build-ci-amd64.sh release
- name: Grant packaging script execute permission
run : chmod +x ./infomaniak-build-tools/linux/package-ci-amd64.sh
- name: Package kDrive desktop and upload to kDrive
run : ./infomaniak-build-tools/linux/package-ci-amd64.sh
# - name: Clean-up generated code
# run : rm -rf build-linux
package-MacOS:
runs-on: [ self-hosted, macOS, desktop-kdrive ]
env:
BRANCH_NAME: ${{ github.ref_name || inputs.BRANCH }}
steps:
- name: Checkout the PR
uses: actions/checkout@v4.1.1
with:
ref: ${{ env.BRANCH_NAME }}
submodules: recursive
- name: Unlock keychain to use the certificate
run : security unlock-keychain -p '${{ secrets.KEYCHAIN_PASSWORD }}' login.keychain
- name: Build and package kDrive desktop
run : ./infomaniak-build-tools/macos/build-drive.sh
- name: Grant upload script execute permission
run : chmod +x ./infomaniak-build-tools/macos/upload-ci.sh
- name: Upload to kDrive
run : ./infomaniak-build-tools/macos/upload-ci.sh
- name: Clean-up generated code
run : rm -rf build-macos