-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from aws/signing-issue
temporarily adding workflow to test signing
- Loading branch information
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
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
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 |