Skip to content

Commit

Permalink
ci: fix test-installation (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
texastony authored Apr 18, 2023
1 parent f8e714c commit ac81733
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/test-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
dafny-version: "3.5.0"
- name: Configure AWS credentials for pulling from CA
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::587316601012:role/GitHub-DotNet-CA-Writer
role-session-name: push_to_code_artifact
Expand All @@ -45,8 +45,8 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/aws-encryption-sdk-net
export BASE_VERSION=`grep '<Version>' Source/AWSEncryptionSDK.csproj | sed 's/.*<Version>\(.*\)<\/Version>/\1/'`
export UNIQUE_VERSION=$BASE_VERSION-`git rev-parse --short HEAD`
echo "::set-output name=UNIQUE_VERSION::$UNIQUE_VERSION"
export UNIQUE_VERSION=$BASE_VERSION-`git rev-parse --short HEAD`-`date +%Y-%m-%d`
echo "UNIQUE_VERSION=$UNIQUE_VERSION" >> $GITHUB_OUTPUT
echo "UNIQUE_VERSION=$UNIQUE_VERSION" >> $GITHUB_ENV
- name: Build and pack
run: |
Expand All @@ -57,7 +57,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/aws-encryption-sdk-net
aws codeartifact login --tool dotnet --domain github --domain-owner 587316601012 --repository dotnet-esdk --duration-seconds 900
dotnet nuget push build/AWS.EncryptionSDK.$UNIQUE_VERSION.nupkg --source github/dotnet-esdk
dotnet nuget push build/AWS.EncryptionSDK.$UNIQUE_VERSION.nupkg --source github/dotnet-esdk --skip-duplicate
test_installation:
name: test_installation_${{ matrix.os }}
Expand All @@ -70,8 +70,12 @@ jobs:
id-token: write
contents: read
steps:
- name: Setup .NET Core SDK 3.1.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Configure AWS credentials for pulling from CA
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::587316601012:role/GitHub-DotNet-CA-Reader
aws-region: us-west-2
Expand Down Expand Up @@ -108,7 +112,7 @@ jobs:
contents: read
steps:
- name: Configure AWS credentials for pulling from CA
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::587316601012:role/GitHub-DotNet-CA-Reader
aws-region: us-west-2
Expand Down Expand Up @@ -142,7 +146,7 @@ jobs:
contents: read
steps:
- name: Configure AWS credentials for pulling from CA
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::587316601012:role/GitHub-DotNet-CA-Purger
aws-region: us-west-2
Expand All @@ -151,4 +155,4 @@ jobs:
export UNIQUE_VERSION=${{ needs.push_to_code_artifact.outputs.UNIQUE_VERSION }}
echo "UNIQUE_VERSION=$UNIQUE_VERSION" >> $GITHUB_ENV
- name: CodeArtifact Purger
run: aws codeartifact delete-package-versions --domain github --repository dotnet-esdk --format nuget --package awsencryptionsdk --versions $UNIQUE_VERSION
run: aws codeartifact delete-package-versions --domain github --repository dotnet-esdk --format nuget --package aws.encryptionsdk --versions "${{ needs.push_to_code_artifact.outputs.UNIQUE_VERSION }}"

0 comments on commit ac81733

Please sign in to comment.