mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
684ee43f22
1 file changed
+130
@@ -0,0 +1,130 @@
|
||||
name: Test Artifact Signing
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version (e.g. 7.0.2)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 1) Build EHR on Linux
|
||||
# ---------------------------------------------------------
|
||||
build-ehr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Build EHR
|
||||
run: dotnet build EHR.csproj -c Release -o build/
|
||||
|
||||
- name: Upload EHR artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ehr
|
||||
path: build/EHR.dll
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 2) Build Control Panel on Windows using MSBuild
|
||||
# ---------------------------------------------------------
|
||||
build-control-panel:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Restore .NET packages
|
||||
run: dotnet restore -p:SelfContained=true CTA/CustomTeamAssigner/CustomTeamAssigner.csproj
|
||||
|
||||
- name: Build Control Panel (MSBuild)
|
||||
run: |
|
||||
msbuild CTA/CustomTeamAssigner/CustomTeamAssigner.csproj `
|
||||
/p:Configuration=Release `
|
||||
/p:Platform="x64" `
|
||||
/p:PublishSingleFile=true `
|
||||
/p:SelfContained=true `
|
||||
/p:RuntimeIdentifier=win-x64 `
|
||||
/p:IncludeAllContentForSelfExtract=true `
|
||||
/p:DebugType=None `
|
||||
/p:PublishDir=build\ `
|
||||
/t:publish
|
||||
|
||||
- name: Rename exe file
|
||||
run: |
|
||||
mkdir build/
|
||||
mv CTA/CustomTeamAssigner/build/CustomTeamAssigner.exe build/EHR_Control-Panel_BETA.exe
|
||||
|
||||
- name: Upload Control Panel artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: control-panel
|
||||
path: build\EHR_Control-Panel_BETA.exe
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 3) Sign binaries using SignPath
|
||||
# ---------------------------------------------------------
|
||||
sign:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-ehr, build-control-panel]
|
||||
|
||||
steps:
|
||||
- name: Download EHR
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ehr
|
||||
path: signing
|
||||
|
||||
- name: Download Control Panel
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: control-panel
|
||||
path: signing
|
||||
|
||||
- name: Create SignPath ZIP
|
||||
run: |
|
||||
cd signing
|
||||
zip ../signpath-input.zip EHR.dll EHR_Control-Panel_BETA.exe
|
||||
|
||||
- name: Upload unsigned artifact
|
||||
id: upload-unsigned-artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: signpath-input
|
||||
path: signpath-input.zip
|
||||
|
||||
- name: Submit signing request
|
||||
uses: signpath/github-action-submit-signing-request@v2
|
||||
with:
|
||||
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
|
||||
organization-id: 298f5e96-d02b-40b5-88f6-32bddafcd47d
|
||||
project-slug: EndlessHostRoles
|
||||
signing-policy-slug: test-signing
|
||||
artifact-configuration-slug: initial
|
||||
github-artifact-id: ${{ steps.upload-unsigned-artifact.outputs.artifact-id }}
|
||||
wait-for-completion: true
|
||||
output-artifact-directory: signed
|
||||
|
||||
- name: Extract signed ZIP
|
||||
run: |
|
||||
mkdir extracted
|
||||
unzip signed/*.zip -d extracted
|
||||
|
||||
- name: Upload signed binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: signed-binaries
|
||||
path: extracted/*
|
||||
Reference in new issue
Block a user