Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Upload compiled nupkg file from GitHub Runner to Action output #605

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/manual_release_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Manually build release-ready NuGet package

on:
workflow_dispatch: ~

jobs:
build:
name: Build Release-Ready NuGet Package
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
# .NET 5 is deprecated and removed from GitHub Actions, we need to manually install it
dotnet-version: |
5.x.x
8.x.x

- name: Setup Nuget
uses: NuGet/[email protected]

- name: Restore NuGet Packages
run: make restore

- name: Set up dotnet tools and dependencies
run: make install

- name: Set up authenticity certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
shell: bash

- name: Set variables
id: variables
run: |
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
echo "C:\Program Files\DigiCert\DigiCert Keylocker Tools" >> $GITHUB_PATH
shell: bash

- name: Setup Keylocker KSP on Windows
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o Keylockertools-windows-x64.msi
msiexec /i Keylockertools-windows-x64.msi /quiet /qn
smksp_registrar.exe list
smctl.exe keypair ls
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
shell: cmd

- name: Sync Certificates
run: |
smctl windows certsync
shell: cmd

- name: Build and Sign NuGet package
run: |
call scripts\win\build_release_nuget.bat EasyPost EasyPostNETStrongNameSigning.snk "${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}" Release
shell: cmd

- name: Upload NuGet package to Action output
uses: actions/upload-artifact@v4
with:
path: "*.nupkg"
Loading