Merge pull request #148 from reactivemarbles/HouseKeeping #116
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
# ------------------------------------------------------------------------------ | |
# <auto-generated> | |
# | |
# This code was generated. | |
# | |
# - To turn off auto-generation set: | |
# | |
# [GitHubActions (AutoGenerate = false)] | |
# | |
# - To trigger manual generation invoke: | |
# | |
# nuke --generate-configuration GitHubActions_BuildDeploy --host GitHubActions | |
# | |
# </auto-generated> | |
# ------------------------------------------------------------------------------ | |
name: BuildDeploy | |
on: | |
push: | |
branches: | |
- master | |
env: | |
configuration: Release | |
jobs: | |
windows-latest: | |
name: windows-latest | |
runs-on: windows-latest | |
environment: | |
name: release | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'Setup Java JDK 11' | |
uses: actions/setup-java@v4.2.1 | |
with: | |
distribution: 'microsoft' | |
java-version: '11' | |
- name: 'Install DotNet workloads' | |
shell: bash | |
run: | | |
dotnet workload install android ios tvos macos maui maccatalyst wasm-tools | |
- name: NBGV | |
id: nbgv | |
uses: dotnet/nbgv@master | |
with: | |
setAllVars: true | |
- run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}' | |
- name: 'Cache: .nuke/temp, ~/.nuget/packages' | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.nuke/temp | |
~/.nuget/packages | |
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | |
- name: 'Run: Compile Pack' | |
run: ./build.cmd Pack | |
env: | |
NuGetApiKey: ${{ secrets.NUGET_API_KEY }} | |
- name: 'Publish: output' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output | |
path: output | |
# # 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/ChangeLog@v1 | |
id: changelog | |
- name: Create Release | |
uses: actions/create-release@v1.1.4 | |
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: 'Run: Deploy' | |
run: ./build.cmd Deploy | |
env: | |
NuGetApiKey: ${{ secrets.NUGET_API_KEY }} |