Merge pull request #1159 from Particular/switch-hashing-algo #112
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| - '[0-9]+.[0-9]+.[0-9]+-*' | |
| env: | |
| DOTNET_NOLOGO: true | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v5.1.0 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Build | |
| run: dotnet build src --configuration Release | |
| - name: Sign NuGet packages | |
| uses: Particular/sign-nuget-packages-action@v1.0.0 | |
| with: | |
| client-id: ${{ secrets.AZURE_KEY_VAULT_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_KEY_VAULT_TENANT_ID }} | |
| client-secret: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }} | |
| certificate-name: ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }} | |
| - name: Publish artifacts | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: nugets | |
| path: nugets/* | |
| retention-days: 1 | |
| - name: Deploy to Feedz | |
| run: dotnet nuget push nugets/Particular.EndpointThroughputCounter.${{env.MinVerVersion}}.nupkg --api-key ${{ secrets.FEEDZIO_PUBLISH_API_KEY }} --source "${{ vars.PARTICULAR_PACKAGES_FEED_URL }}" | |
| - name: Build SelfContained | |
| run: dotnet publish src/Exe --configuration Release --output binaries | |
| - name: Install AzureSignTool | |
| run: dotnet tool install --global azuresigntool | |
| - name: Sign exe | |
| run: > | |
| AzureSignTool sign | |
| --file-digest sha256 | |
| --timestamp-rfc3161 http://timestamp.digicert.com | |
| --azure-key-vault-url https://particularcodesigning.vault.azure.net | |
| --azure-key-vault-client-id ${{ secrets.AZURE_KEY_VAULT_CLIENT_ID }} | |
| --azure-key-vault-tenant-id ${{ secrets.AZURE_KEY_VAULT_TENANT_ID }} | |
| --azure-key-vault-client-secret ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }} | |
| --azure-key-vault-certificate ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }} | |
| ./binaries/Particular.EndpointThroughputCounter.exe | |
| - name: Publish exe artifacts | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: exe | |
| path: binaries/* | |
| retention-days: 1 | |
| - name: Setup AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4.2.1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_DEPLOY_ACCESSKEY }} | |
| aws-secret-access-key: ${{ secrets.AWS_DEPLOY_SECRETKEY }} | |
| aws-region: us-east-1 | |
| - name: Deploy to S3 | |
| shell: pwsh | |
| run: | | |
| echo "Creating Particular.EndpointThroughputCounter.zip archive" | |
| Compress-Archive -Path ./binaries/* -DestinationPath ./binaries/Particular.EndpointThroughputCounter.zip | |
| echo "Uploading zip file to AWS" | |
| aws s3 cp ./binaries/Particular.EndpointThroughputCounter.zip s3://particular.downloads/EndpointThroughputCounter/Particular.EndpointThroughputCounter.zip --content-type application/zip --acl public-read | |
| echo "Uploading version.txt file to AWS" | |
| echo "${{env.MinVerVersion}}" > version.txt | |
| aws s3 cp ./version.txt s3://particular.downloads/EndpointThroughputCounter/version.txt --content-type text/plain --acl public-read | |
| echo "Complete" |