Skip to content

Adding Libs

Adding Libs #14

Workflow file for this run

name: Build Project
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_and_run:
runs-on: windows-latest
env:
SOLNAME: SOLUTIONNAME
SOLSLN: SOLUTIONNAME.sln
SOLDLL: SOLUTIONNAME.dll
outputs:
Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
steps:
- uses: actions/checkout@v2
# Set up MSBuild
- name: Set up MSBuild path
uses: microsoft/setup-msbuild@v1.0.2
# Build C++ project
- name: Build C++ project
run: msbuild MeshoptimizerWrapper.sln -property:Configuration=Release -property:Platform="x64" -target:MeshOpt
# Get PFX Certificate
- name: Get certificate
run: |
$url = "${{ secrets.EVERSE_CERTIFICATE_S3_URL }}"
$outputFilePath = "credentials.pfx"
$apiKey = "${{ secrets.EVERSE_AWS_S3_CERTIFICATE_KEY_ID }}"
$headers = @{
"x-api-key" = $apiKey
}
Invoke-RestMethod -Uri $url -Headers $headers -OutFile $outputFilePath
# Install and restore the necessary NuGet packages
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.6
- name: Restore NuGet Packages
run: nuget restore "MeshoptimizerWrapper.sln"
# Sign Dll
- name: Sign dlls
run: |
$dlls = dir -Path .\ -Filter "MeshOpt.dll.dll" -Recurse | %{$_.FullName}
foreach ($dll in $dlls)
{
packages\signtool.10.0.17763.132\tools\signtool.exe sign /f "credentials.pfx" /p ${{ secrets.EVERSE_CERTIFICATE_KEY }} /t http://timestamp.digicert.com "$dll"
Write-Host $dll
}
# Create Nuget Package
- name: Create NuGet package
run: |
nuget pack Nuget/MeshOpt.glTFPack.nuspec -Properties Configuration=Release
# Upload Nuget Package
- name: Push NuGet package
run: |
nuget push *.nupkg -Source "https://api.nuget.org/v3/index.json" -ApiKey ${{secrets.NUGET_TOKEN_EVERSE}} -SkipDuplicate
dotnet nuget add source https://nuget.pkg.github.com/eversedevelopment/index.json --name github --username pderendinger-everse --password ${{ secrets.NUGET_TOKEN }} --store-password-in-clear-text