This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
chore(deps): update actions/checkout action to v4 #279
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json | |
name: Build Image | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-gui: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'client/go.mod' | |
cache-dependency-path: 'client/go.sum' | |
- run: go build -ldflags -H=windowsgui .\cmd\gui\ | |
working-directory: client | |
- run: go build .\cmd\cli\ | |
working-directory: client | |
- name: Sign the GUI Exe (test) | |
run: ./msi/SignClientExe.ps1 | |
continue-on-error: true | |
env: | |
PFX_PASSPHRASE: ${{ secrets.PFX_PASSPHRASE }} | |
PFX_THUMBPRINT: ${{ secrets.PFX_THUMBPRINT }} | |
if: startsWith(github.ref, 'refs/tags/') != true | |
- name: Sign the GUI Exe (release) | |
run: ./msi/AzureSignClientExe.ps1 | |
env: | |
AZURE_SIGN_CLIENT_SECRET: ${{ secrets.AZURE_SIGN_CLIENT_SECRET }} | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Upload Archive (tar) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: client-windows | |
path: client/*.exe | |
build-container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: make image | |
- name: Upload Archive (tar) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-container-image | |
path: image*.tar | |
build-msi: | |
runs-on: windows-latest | |
needs: | |
- build-container | |
- build-gui | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set path for candle and light | |
env: | |
WIX_PATH: ${{ env.wix }} | |
run: echo "$env:WIX_PATH\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Download artifact (linux container image) | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux-container-image | |
- name: Download artifact (gui client) | |
uses: actions/download-artifact@v3 | |
with: | |
name: client-windows | |
- name: Build the MSI Package | |
run: ./msi/BuildInstaller.ps1 | |
- name: Sign the MSI Package (test) | |
run: ./msi/SignInstaller.ps1 | |
continue-on-error: true | |
env: | |
PFX_PASSPHRASE: ${{ secrets.PFX_PASSPHRASE }} | |
PFX_THUMBPRINT: ${{ secrets.PFX_THUMBPRINT }} | |
if: startsWith(github.ref, 'refs/tags/') != true | |
- name: Sign the MSI Package (release) | |
run: ./msi/AzureSignInstaller.ps1 | |
env: | |
AZURE_SIGN_CLIENT_SECRET: ${{ secrets.AZURE_SIGN_CLIENT_SECRET }} | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Move artifact to top | |
run: mv msi/bin/Release/* ./ | |
- name: Upload Archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: msi-package | |
path: "*.msi" | |
release: | |
runs-on: ubuntu-latest | |
needs: build-msi | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download a single artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: msi-package | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: '*.msi' | |