Skip to content

Commit

Permalink
update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Aug 18, 2024
1 parent 9b81609 commit deb0041
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 38 deletions.
46 changes: 29 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ env:
build-output: build-output

permissions:
contents: write
packages: read
contents: write

jobs:
build:
Expand All @@ -18,33 +18,45 @@ jobs:
matrix:
arch: [win10-x64, win10-arm64]

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
OUTPUT_FILENAME: kaplan-${{ matrix.arch }}.exe

steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
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 dotnet-project-licenses
dotnet tool install --global DragonFruit.Overpass.Cli
dotnet tool install --global nuget-license
- name: Generate licences.txt
run: dotnet-project-licenses -i DragonFruit.Kaplan.sln -u -o --output-directory DragonFruit.Kaplan\Assets --outfile 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: Run Build Script
run: overpass-cli
- name: Sign
env:
AppName: kaplan-${{ matrix.arch }}
Build__TargetRuntime: ${{ matrix.arch }}
Providers__GitHub__AccessToken: ${{ secrets.GITHUB_TOKEN }}
Certificates__DragonFruit__B64Contents: ${{ secrets.DRAGONFRUIT_CERT_CONTENTS }}
Certificates__DragonFruit__Password: ${{ secrets.DRAGONFRUIT_CERT_PASSWORD }}
Toolkit__signtool: C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe
certificateContents: ${{ secrets.DRAGONFRUIT_CERT_CONTENTS }}
certificatePassword: ${{ secrets.DRAGONFRUIT_CERT_PASSWORD }}
run: |
echo $env:certificateContents > $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 }}
21 changes: 0 additions & 21 deletions overpass.ini

This file was deleted.

0 comments on commit deb0041

Please sign in to comment.