mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-13 16:21:25 +00:00
70 lines
2.7 KiB
YAML
70 lines
2.7 KiB
YAML
name: Build Installer
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 'release-*'
|
|
- 'beta-release-*'
|
|
|
|
env:
|
|
BUILD_CONFIG: "Release"
|
|
BUILDNUMBER: ${{github.run_number}}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build the Ziti Desktop Edge for Windows Installer Package
|
|
runs-on: windows-latest
|
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
env:
|
|
SIGNING_CERT: ${{ secrets.SIGNING_CERT }}
|
|
ADV_INST_KEY: ${{ secrets.ADV_INST_KEY }}
|
|
JFROG_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }}
|
|
gh_ci_key: ${{ secrets.GH_CI_KEY }}
|
|
ZITI_DEBUG: "yes_please"
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: microsoft/setup-msbuild@v1
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.15.5'
|
|
- if: github.event_name == 'push'
|
|
run: echo "GIT_BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" >> $env:GITHUB_ENV
|
|
- if: github.event_name == 'pull_request'
|
|
run: echo "GIT_BRANCH=$env:GITHUB_HEAD_REF" >> $env:GITHUB_ENV
|
|
- name: Adding gopath to env
|
|
run: echo "$(go env GOPATH)\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
|
- name: Setup secrets
|
|
run: |
|
|
echo "${env:SIGNING_CERT}" > WinSign.b64
|
|
echo "${env:ADV_INST_KEY}" > ADV_INST_KEY.key
|
|
C:\Windows\System32\certutil.exe -decode WinSign.b64 Installer/WinSign.p12
|
|
- name: Trying to run choco install.
|
|
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
- name: "Install Choco needs: advanced-installer wixtoolset zip ninja"
|
|
run: choco install advanced-installer wixtoolset zip ninja --yes
|
|
- name: Build the Service
|
|
run: service/publish.bat
|
|
- name: Setting up version env var
|
|
run: echo "VERSION=$(cat .\version)" >> $env:GITHUB_ENV
|
|
- name: Upload service zip onto job
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ziti-tunnel-win.zip-${{ env.VERSION }}
|
|
path: "service/ziti-tunnel-win.zip"
|
|
- name: Restore nuget packages
|
|
run: nuget restore ZitiDesktopEdge.sln
|
|
- shell: pwsh
|
|
name: Register Advanced Installer
|
|
run: |
|
|
$key=(Get-Content .\ADV_INST_KEY.key)
|
|
.\Installer\reg.bat $key
|
|
- name: Build UI and Assemble Installer
|
|
run: powershell -File .\Installer\build.ps1
|
|
- name: Upload installer onto job
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ZitiDesktopEdgeClient-${{ env.VERSION }}
|
|
path: "Installer/Output/Ziti Desktop Edge Client-*"
|