11name : Release Build
22on :
3+ push :
34 workflow_dispatch :
45 inputs :
56 version :
1415 RELEASE_PRIVATE_REPOSITORY : 020628701572.dkr.ecr.us-west-2.amazonaws.com/adot-autoinstrumentation-python
1516 RELEASE_PRIVATE_REGISTRY : 020628701572.dkr.ecr.us-west-2.amazonaws.com
1617 PACKAGE_NAME : aws-opentelemetry-distro
18+ ARTIFACT_NAME : aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
1719
1820permissions :
1921 id-token : write
@@ -37,96 +39,95 @@ jobs:
3739 package_name : aws-opentelemetry-distro
3840 os : ubuntu-latest
3941
40- # TODO: Add some sort of smoke/integration testing before we go
41- # release the artifacts. adot java for reference:
42- # https://github.com/aws-observability/aws-otel-java-instrumentation/tree/93870a550ac30988fbdd5d3bf1e8f9f1b37916f5/smoke-tests
42+ # # TODO: Add some sort of smoke/integration testing before we go
43+ # # release the artifacts. adot java for reference:
44+ # # https://github.com/aws-observability/aws-otel-java-instrumentation/tree/93870a550ac30988fbdd5d3bf1e8f9f1b37916f5/smoke-tests
4345
44- - name : Configure AWS credentials for PyPI secrets
45- uses : aws-actions/configure-aws-credentials@v4
46- with :
47- role-to-assume : ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
48- aws-region : ${{ env.AWS_DEFAULT_REGION }}
46+ # - name: Configure AWS credentials for PyPI secrets
47+ # uses: aws-actions/configure-aws-credentials@v4
48+ # with:
49+ # role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
50+ # aws-region: ${{ env.AWS_DEFAULT_REGION }}
4951
50- - name : Get PyPI secrets
51- uses : aws-actions/aws-secretsmanager-get-secrets@v1
52- id : pypi_secrets
53- with :
54- secret-ids : |
55- PROD_PYPI_TOKEN,${{ secrets.PYPI_PROD_TOKEN_SECRET_ARN }}
56- TEST_PYPI_TOKEN,${{ secrets.PYPI_TEST_TOKEN_SECRET_ARN }}
57- parse-json-secrets : true
58-
59- - name : Configure AWS credentials for private ECR
60- uses : aws-actions/configure-aws-credentials@v4
61- with :
62- role-to-assume : ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
63- aws-region : ${{ env.AWS_PRIVATE_ECR_REGION }}
64-
65- - name : Log in to AWS private ECR
66- uses : docker/login-action@v3
67- with :
68- registry : ${{ env.RELEASE_PRIVATE_REGISTRY }}
69-
70- - name : Configure AWS credentials for public ECR
71- uses : aws-actions/configure-aws-credentials@v4
72- with :
73- role-to-assume : ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
74- aws-region : ${{ env.AWS_PUBLIC_ECR_REGION }}
75-
76- - name : Log in to AWS public ECR
77- uses : docker/login-action@v3
78- with :
79- registry : public.ecr.aws
80-
81- # The step below publishes to testpypi in order to catch any issues
82- # with the package configuration that would cause a failure to upload to pypi.
83- - name : Install twine
84- run : pip install twine
52+ # - name: Get PyPI secrets
53+ # uses: aws-actions/aws-secretsmanager-get-secrets@v1
54+ # id: pypi_secrets
55+ # with:
56+ # secret-ids: |
57+ # PROD_PYPI_TOKEN,${{ secrets.PYPI_PROD_TOKEN_SECRET_ARN }}
58+ # TEST_PYPI_TOKEN,${{ secrets.PYPI_TEST_TOKEN_SECRET_ARN }}
59+ # parse-json-secrets: true
60+
61+ # - name: Configure AWS credentials for private ECR
62+ # uses: aws-actions/configure-aws-credentials@v4
63+ # with:
64+ # role-to-assume: ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
65+ # aws-region: ${{ env.AWS_PRIVATE_ECR_REGION }}
66+
67+ # - name: Log in to AWS private ECR
68+ # uses: docker/login-action@v3
69+ # with:
70+ # registry: ${{ env.RELEASE_PRIVATE_REGISTRY }}
71+
72+ # - name: Configure AWS credentials for public ECR
73+ # uses: aws-actions/configure-aws-credentials@v4
74+ # with:
75+ # role-to-assume: ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
76+ # aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }}
77+
78+ # - name: Log in to AWS public ECR
79+ # uses: docker/login-action@v3
80+ # with:
81+ # registry: public.ecr.aws
82+
83+ # # The step below publishes to testpypi in order to catch any issues
84+ # # with the package configuration that would cause a failure to upload to pypi.
85+ # - name: Install twine
86+ # run: pip install twine
8587
86- - name : Publish to TestPyPI
87- env :
88- TWINE_USERNAME : ' __token__'
89- TWINE_PASSWORD : ${{ env.TEST_PYPI_TOKEN_API_TOKEN }}
90- run : |
91- twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro- ${{ github.event.inputs.version }}-py3-none-any.whl
92-
93- # Publish to prod PyPI
94- - name : Publish to PyPI
95- env :
96- TWINE_USERNAME : ' __token__'
97- TWINE_PASSWORD : ${{ env.PROD_PYPI_TOKEN_API_TOKEN }}
98- run : |
99- twine upload --skip-existing --verbose dist/aws_opentelemetry_distro- ${{ github.event.inputs.version }}-py3-none-any.whl
100-
101- # Publish to public ECR
102- - name : Build and push public ECR image
103- uses : docker/build-push-action@v5
104- with :
105- push : true
106- context : .
107- file : ./Dockerfile
108- platforms : linux/amd64,linux/arm64
109- tags : |
110- ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
111-
112- # Publish to private ECR
113- - name : Build and push private ECR image
114- uses : docker/build-push-action@v5
115- with :
116- push : true
117- context : .
118- file : ./Dockerfile
119- platforms : linux/amd64,linux/arm64
120- tags : |
121- ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
88+ # - name: Publish to TestPyPI
89+ # env:
90+ # TWINE_USERNAME: '__token__'
91+ # TWINE_PASSWORD: ${{ env.TEST_PYPI_TOKEN_API_TOKEN }}
92+ # run: |
93+ # twine upload --repository testpypi --skip-existing --verbose dist/${{ env.ARTIFACT_NAME }}
94+
95+ # # Publish to prod PyPI
96+ # - name: Publish to PyPI
97+ # env:
98+ # TWINE_USERNAME: '__token__'
99+ # TWINE_PASSWORD: ${{ env.PROD_PYPI_TOKEN_API_TOKEN }}
100+ # run: |
101+ # twine upload --skip-existing --verbose dist/${{ env.ARTIFACT_NAME }}
102+
103+ # # Publish to public ECR
104+ # - name: Build and push public ECR image
105+ # uses: docker/build-push-action@v5
106+ # with:
107+ # push: true
108+ # context: .
109+ # file: ./Dockerfile
110+ # platforms: linux/amd64,linux/arm64
111+ # tags: |
112+ # ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
113+
114+ # # Publish to private ECR
115+ # - name: Build and push private ECR image
116+ # uses: docker/build-push-action@v5
117+ # with:
118+ # push: true
119+ # context: .
120+ # file: ./Dockerfile
121+ # platforms: linux/amd64,linux/arm64
122+ # tags: |
123+ # ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
122124
123125 - name : Get SHA256 checksum of wheel file
124126 id : get_sha256
125127 env :
126128 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
127129 run : |
128- filename="aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl"
129- shasum -a 256 dist/$filename | awk '{print $1}' > $filename.sha256
130+ shasum -a 256 dist/${{ env.ARTIFACT_NAME }} | awk '{print $1}' > ${{ env.ARTIFACT_NAME }}.sha256
130131
131132 # Publish to GitHub releases
132133 - name : Create GH release
@@ -138,5 +139,5 @@ jobs:
138139 --title "Release v${{ github.event.inputs.version }}" \
139140 --draft \
140141 "v${{ github.event.inputs.version }}" \
141- dist/aws_opentelemetry_distro- ${{ github.event.inputs.version }}-py3-none-any.whl \
142- aws_opentelemetry_distro- ${{ github.event.inputs.version }}-py3-none-any.whl .sha256
142+ dist/${{ env.ARTIFACT_NAME }} \
143+ ${{ env.ARTIFACT_NAME }}.sha256
0 commit comments