diff --git a/.github/workflows/manual_release_prep.yml b/.github/workflows/manual_release_prep.yml deleted file mode 100644 index 993ffccc..00000000 --- a/.github/workflows/manual_release_prep.yml +++ /dev/null @@ -1,72 +0,0 @@ -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@v5 - - - name: Install .NET SDK - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 6.x.x - 7.x.x - 8.x.x - 9.x.x - 10.x.x - - - name: Setup Nuget - uses: NuGet/setup-nuget@v2 - - - 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 }}" "${{ secrets.SM_CODE_SIGNING_CERT_SHA256_HASH }}" Release - shell: cmd - - - name: Upload NuGet package to Action output - uses: actions/upload-artifact@v4 - with: - path: '*.nupkg' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 794b8eab..a1c7afd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release on: release: types: [published] + workflow_dispatch: ~ jobs: publish: diff --git a/Makefile b/Makefile index a9499f5a..bf8322b1 100644 --- a/Makefile +++ b/Makefile @@ -45,13 +45,13 @@ init-examples-submodule: ## install-tools - Install required dotnet tools install-tools: - dotnet new tool-manifest || exit 0 + dotnet new tool-manifest --force || exit 0 dotnet tool install --local security-scan --version 5.6.3 || exit 0 dotnet tool install --local dotnet-format || exit 0 dotnet tool install --local docfx --version 2.60.2 || exit 0 ## install-styleguide - Import style guide (Unix only) -install-styleguide: | update-examples-submodule +install-styleguide: | init-examples-submodule sh examples/symlink_directory_files.sh examples/style_guides/csharp . ## install - Install requirements diff --git a/scripts/win/build_release_nuget.bat b/scripts/win/build_release_nuget.bat index 0fc8f9d2..2a66bdda 100644 --- a/scripts/win/build_release_nuget.bat +++ b/scripts/win/build_release_nuget.bat @@ -50,7 +50,7 @@ GOTO :eof :usage @ECHO: -@ECHO Usage: %0 +@ECHO Usage: %0 GOTO :exitWithError :commandFailed