Files
desktop-edge-win/.github/workflows/installer.build.yml
T
2020-10-21 21:42:48 -04:00

71 lines
2.7 KiB
YAML

name: Build Installer
on:
push:
branches:
- master
- '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:
SOME_KEY: ${{ secrets.SOME_KEY }}
ADV_INST_KEY: ${{ secrets.ADV_INST_KEY }}
JFROG_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: microsoft/setup-msbuild@v1
- name: Set GIT_BRANCH and add GOPATH/bin to PATH
run: |
echo "GIT_BRANCHNEW=$env:GITHUB_REF.replace('refs/heads/', '')" >> $GITHUB_ENV
echo "JFROG_ACCESS_TOKENNEW=${JFROG_ACCESS_TOKEN}" >> $GITHUB_ENV
echo "$(go env GOPATH)/binbin" >> $GITHUB_PATH
echo ("::set-env name=GIT_BRANCH::" + $env:GITHUB_REF.replace('refs/heads/', ''))
echo "::set-env name=GOPATH::$(go env GOPATH)"
echo "::add-path::$(go env GOPATH)/bin"
#echo "::add-path::$(go env GOPATH)/bin"
- name: Setup secrets
run: |
echo "${env:SOME_KEY}" > WinSign.b64
echo "${env:ADV_INST_KEY}" > ADV_INST_KEY.key
C:\Windows\System32\certutil.exe -decode WinSign.b64 Installer/WinSign.p12
- name: Dump Env (debug step)
run: env
- 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: Upload service zip onto job
uses: actions/upload-artifact@v2
with:
name: ziti-tunnel-win.zip
path: "service/ziti-tunnel-win.zip"
env:
version: Get-Content .\version
- 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
path: "Installer/Output/Ziti Desktop Edge Client-*.exe"
env:
version: Get-Content .\version