Skip to content

Commit

Permalink
Merge pull request #302 from aws/signing-issue
Browse files Browse the repository at this point in the history
temporarily adding workflow to test signing
  • Loading branch information
wangzlei authored Jun 19, 2024
2 parents 62cfacd + efb8ed6 commit 3ca2073
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/test-release-wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Test-Release (DELETE LATER)

on:
workflow_dispatch:
inputs:
version:
description: The version to tag the release with, e.g., 1.2.0, 1.3.0
required: true

permissions:
id-token: write
contents: write

jobs:
test-build-pack-release:
runs-on: windows-latest

env:
DOTNET_MULTILEVEL_LOOKUP: 1

strategy:
fail-fast: true

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Assume role to get .snk file
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN_RELEASE }}
aws-region: us-west-2

- name: Get Strong-Naming Key
run: >
aws s3api get-object
--bucket ${{ secrets.SNK_BUCKET }}
--key awsxrayrecorder.dll.snk
awsxrayrecorder.dll.snk
- name: Install dependencies
run: dotnet restore .\sdk\AWSXRayRecorder.sln

- name: Build solution
run: >
dotnet build
.\sdk\AWSXRayRecorder.sln
/p:Configuration=Release
--no-restore
/p:AssemblyOriginatorKeyFile=${{ github.workspace }}\awsxrayrecorder.dll.snk
- name: Clean up the snk file
run: rm .\awsxrayrecorder.dll.snk

- name: Assume signer role
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ARTIFACT_ACCESS_ROLE_ARN }}
aws-region: us-west-2

- name: Invoke Signing script
env:
UNSIGNED_BUCKET: ${{ secrets.AWS_UNSIGNED_BUCKET_NAME }}
SIGNED_BUCKET: ${{ secrets.AWS_SIGNED_BUCKET_NAME }}
#TODO: There is probably a better way to pass in a list of paths as a single parameter to the script.
run: |
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Core\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\AspNet\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\AspNetCore\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\AwsSdk\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\EntityFramework\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\SqlServer\bin\Release
.\buildtools\sign_files.ps1 -Filters AWSXRayRecorder.*.dll -Recurse -Path .\sdk\src\Handlers\System.Net\bin\Release
- name: Pack nugets
run: >
dotnet pack
.\sdk\AWSXRayRecorder.sln
--no-build
-c Release
-o .\Deployment\nuget-packages
nuget pack
.\sdk\AWSXRayRecorder.nuspec
-OutputDirectory .\Deployment\nuget-packages
-Exclude **
- name: Upload nugets to this GitHub Action run as an artifact
uses: actions/upload-artifact@v2
with:
name: nuget-packages
path: Deployment/nuget-packages/

- name: Assume nuget role
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.NUGET_ACCESS_ROLE_ARN }}
aws-region: us-west-2

0 comments on commit 3ca2073

Please sign in to comment.