Skip to content

2024.818

2024.818 #27

Workflow file for this run

name: Publish
on:
release:
types: [ published ]
env:
build-output: build-output
permissions:
packages: read
contents: write
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [win-x64, win-arm64]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
OUTPUT_FILENAME: kaplan-${{ matrix.arch }}.exe
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup NuGet
run: dotnet nuget add source --username github --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/dragonfruitnetwork/index.json"
- name: NuGet Restore
run: |
dotnet restore
dotnet tool install --global nuget-license
- name: Generate licences.txt
run: nuget-license -i DragonFruit.Kaplan\DragonFruit.Kaplan.csproj -o Table > DragonFruit.Kaplan\Assets\licences.txt
- name: Build
run: dotnet publish -c Release -r ${{ matrix.arch }} -p:Version=${{ github.event.release.tag_name }} --self-contained -o ${{ env.build-output }} DragonFruit.Kaplan\DragonFruit.Kaplan.csproj
- name: Sign
env:
certificateContents: ${{ secrets.DRAGONFRUIT_CERT_CONTENTS }}
certificatePassword: ${{ secrets.DRAGONFRUIT_CERT_PASSWORD }}
run: |
echo $env:certificateContents > $env:USERPROFILE\dragonfruit.pfx.b64
certutil -decode $env:USERPROFILE\dragonfruit.pfx.b64 $env:USERPROFILE\dragonfruit.pfx
$signTool = Join-Path -Path ${env:ProgramFiles(x86)} -ChildPath "Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe"
& $signTool sign /f $env:USERPROFILE\dragonfruit.pfx /p $env:certificatePassword /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com /as /v ${{ env.build-output }}\DragonFruit.Kaplan.exe
- name: Rename Executable
run: |
Rename-Item -Path ${{ env.build-output }}\DragonFruit.Kaplan.exe -NewName $env:OUTPUT_FILENAME
- name: Upload Artifact
uses: softprops/action-gh-release@v2
with:
files: ${{ env.build-output }}/${{ env.OUTPUT_FILENAME }}