Sign binaries and update version numbering

dhcp-server
Pat Hartl 2023-09-03 15:41:03 -05:00 committed by GitHub
parent f8036e62af
commit 1067e9ff93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 5 deletions

View File

@ -14,7 +14,7 @@ jobs:
id: trim_tag_ref id: trim_tag_ref
with: with:
string: '${{ github.ref }}' string: '${{ github.ref }}'
pattern: 'refs/tags/' pattern: 'refs/tags/v'
replace-with: '' replace-with: ''
# Server # Server
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -25,9 +25,15 @@ jobs:
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
run: dotnet build "./LANCommander/LANCommander.csproj" --no-restore run: dotnet build "./LANCommander/LANCommander.csproj" --no-restore /p:Version="${{ steps.trim_tag_ref.outputs.replaced }}"
- name: Publish - name: Publish
run: dotnet publish "./LANCommander/LANCommander.csproj" -c Release -o _Build --self-contained --os win -p:PublishSingleFile=true run: dotnet publish "./LANCommander/LANCommander.csproj" -c Release -o _Build --self-contained --os win -p:PublishSingleFile=true
- name: Sign Windows Binary
uses: nadeemjazmawe/Sign-action-signtool.exe@v0.1
with:
certificate: "${{ secrets.CERTIFICATE }}"
cert-password: "${{ secrets.CERTIFICATE_PASSWORD }}"
filepath: "./_Build/LANCommander.exe"
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@ -42,7 +48,13 @@ jobs:
- name: Restore NuGet packages - name: Restore NuGet packages
run: nuget restore LANCommander.sln run: nuget restore LANCommander.sln
- name: Build and Publish Library - name: Build and Publish Library
run: msbuild LANCommander.Playnite.Extension/LANCommander.PlaynitePlugin.csproj /p:Configuration=Release /p:OutputPath=Build run: msbuild LANCommander.Playnite.Extension/LANCommander.PlaynitePlugin.csproj /p:Configuration=Release /p:OutputPath=Build /p:Version="${{ steps.trim_tag_ref.outputs.replaced }}"
- name: Sign Windows Binary
uses: nadeemjazmawe/Sign-action-signtool.exe@v0.1
with:
certificate: "${{ secrets.CERTIFICATE }}"
cert-password: "${{ secrets.CERTIFICATE_PASSWORD }}"
filepath: "LANCommander.Playnite.Extension/Build/LANCommander.Playnite.Extension.dll"
- name: Download Playnite Release - name: Download Playnite Release
uses: robinraju/release-downloader@v1.7 uses: robinraju/release-downloader@v1.7
with: with:
@ -51,12 +63,19 @@ jobs:
fileName: Playnite1018.zip fileName: Playnite1018.zip
- name: Extract Playnite - name: Extract Playnite
run: Expand-Archive -Path Playnite1018.zip -DestinationPath Playnite run: Expand-Archive -Path Playnite1018.zip -DestinationPath Playnite
- name: Update Manifest Versioning
uses: fjogeleit/yaml-update-action@main
with:
valueFile: "LANCommander.Playnite.Extension/Build/extension.yaml"
propertyPath: "Version"
value: "${{ steps.trim_tag_ref.outputs.replaced }}"
commitChange: false
- name: Run Playnite Toolbox - name: Run Playnite Toolbox
run: Playnite/Toolbox.exe pack LANCommander.Playnite.Extension/Build . run: Playnite/Toolbox.exe pack LANCommander.Playnite.Extension/Build .
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
name: LANCommander.PlaynitePlugin-${{ steps.trim_tag_ref.outputs.replaced }} name: LANCommander.PlaynitePlugin-v${{ steps.trim_tag_ref.outputs.replaced }}
path: LANCommander.PlaynitePlugin_48e1bac7-e0a0-45d7-ba83-36f5e9e959fc_1_0.pext path: LANCommander.PlaynitePlugin_48e1bac7-e0a0-45d7-ba83-36f5e9e959fc_*.pext
# Release # Release