feature: Remove UTF8 bom marking #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
branches: [ main ] | |
env: | |
configuration: Release | |
productNamespacePrefix: "ReactiveMarbles" | |
jobs: | |
build: | |
runs-on: windows-2022 | |
environment: | |
name: release | |
outputs: | |
nbgv: ${{ steps.nbgv.outputs.SemVer2 }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Install .NET 6 | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 6.0.x | |
include-prerelease: true | |
- uses: nuget/setup-nuget@v1 | |
name: Setup NuGet | |
- name: Install DotNet workloads | |
shell: bash | |
run: | | |
dotnet workload install android | |
dotnet workload install ios | |
dotnet workload install tvos | |
dotnet workload install macos | |
dotnet workload install maui | |
dotnet workload install maccatalyst | |
- name: Add MSBuild to PATH | |
uses: glennawatson/[email protected] | |
with: | |
prerelease: true | |
- name: NBGV | |
id: nbgv | |
uses: dotnet/nbgv@master | |
with: | |
setAllVars: true | |
- name: NuGet Restore | |
run: nuget restore | |
working-directory: src | |
- name: Build | |
run: msbuild /t:build,pack /nowarn:MSB4011 /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }} | |
working-directory: src | |
# Decode the base 64 encoded pfx and save the Signing_Certificate | |
- name: Sign NuGet packages | |
shell: pwsh | |
run: | | |
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}") | |
[IO.File]::WriteAllBytes("GitHubActionsWorkflow.pfx", $pfx_cert_byte) | |
$secure_password = ConvertTo-SecureString ${{ secrets.SIGN_CERTIFICATE_PASSWORD }} –asplaintext –force | |
Import-PfxCertificate -FilePath GitHubActionsWorkflow.pfx -Password $secure_password -CertStoreLocation Cert:\CurrentUser\My | |
nuget sign -Timestamper http://timestamp.digicert.com -CertificateFingerprint ${{ secrets.SIGN_CERTIFICATE_HASH }} **/*.nupkg | |
- name: Changelog | |
uses: glennawatson/[email protected] | |
id: changelog | |
- name: Create Release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ steps.nbgv.outputs.SemVer2 }} | |
release_name: ${{ steps.nbgv.outputs.SemVer2 }} | |
body: | | |
${{ steps.changelog.outputs.commitLog }} | |
- name: NuGet Push | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} | |
SOURCE_URL: https://api.nuget.org/v3/index.json | |
run: | | |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg |