Release Current .NET Framework Version #13
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
# This creates a new release on GitHub | |
name: Release Current .NET Framework Version | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: windows-latest | |
environment: AzureC4A8CodeSigning | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: write # This is required for creating a release (as using 'permissions:' will reset the default rights to 'none') | |
steps: | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
# Optional, GitHub token | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
# Required, workflow file name or ID | |
workflow: build-framework.yml | |
# Optional, the conclusion of a completed workflow to search for | |
# Can be one of: | |
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required" | |
# Ignores conclusion by default (thus using the most recent completed run when no other option is specified, regardless of conclusion) | |
workflow_conclusion: success | |
# Optional, will use the branch | |
branch: Framework462 | |
# Optional, directory where to extract artifact | |
path: publish | |
- name: Install AzureSignTool | |
run: dotnet tool install --no-cache --global AzureSignTool | |
- name: Azure CLI login | |
uses: azure/login@v2 | |
with: | |
tenant-id: a53834b7-42bc-46a3-b004-369735c3acf9 # c4a8.onmicrosoft.com | |
client-id: 97676fd8-6001-4096-be4a-fbed37f1355b # from Entra ID app registration | |
allow-no-subscriptions: true | |
- name: Azure CLI get token | |
run: | | |
$kv_token=$(az account get-access-token --scope https://vault.azure.net/.default --query accessToken --output tsv) | |
echo "::add-mask::$kv_token" | |
echo "CODE_SIGN_AKV_ACCESS_TOKEN=$kv_token" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Code-sign the extracted exe | |
run: | | |
azuresigntool.exe sign --verbose ` | |
--azure-key-vault-url "https://kv-c4a8-code-signing-prd.vault.azure.net" ` | |
--azure-key-vault-accesstoken ${{ env.CODE_SIGN_AKV_ACCESS_TOKEN }} ` | |
--azure-key-vault-certificate "glueckkanja-ag-202311" ` | |
--timestamp-rfc3161 "http://timestamp.digicert.com" ` | |
publish/scepclient-win-x64/ScepClient.exe | |
# Now we do not have the ZIP anymore, so we must re-zip the extracted exe | |
- name: ZIP EXE for download | |
run: | | |
Compress-Archive -Path publish/scepclient-win-x64/*.exe, publish/scepclient-win-x64/*.exe.config, publish/scepclient-win-x64/*.dll -DestinationPath scepclient-framework-win-x64.zip -Force | |
- name: Create tag | |
id: create_tag | |
shell: bash | |
run: | | |
tag=$(date +"%Y%m%d-%H%M-framework") | |
echo "tag=$tag" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
artifacts: scepclient-core-linux-x64.zip | |
tag: ${{ steps.create_tag.outputs.tag }} | |
artifactContentType: application/zip | |
makeLatest: true |