diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 09ecfbb..681e207 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,8 +8,8 @@ env: build-output: build-output permissions: - contents: write packages: read + contents: write jobs: build: @@ -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 }} diff --git a/overpass.ini b/overpass.ini deleted file mode 100644 index 316fc8b..0000000 --- a/overpass.ini +++ /dev/null @@ -1,21 +0,0 @@ -# AppName="kaplan" -DistributionMethod="GitHub" -PackageFormat="Archive" - -[Overpass] -AppId="kaplan" -Branch="stable" - -[GitHub] -RepoName="kaplan" -RepoOwner="dragonfruitnetwork" -CreateRelease="false" - -[Build] -System="dotnet" -SingleFile="true" -SelfContained="true" -Configuration="Release" -# TargetRuntime="win10-x64" -# TargetFramework="net7.0-windows10.0.19041" -TargetProject="DragonFruit.Kaplan\DragonFruit.Kaplan.csproj" \ No newline at end of file