66 description : The version to tag the release with, e.g., 1.2.0
77 required : true
88
9+ VERSION : ${{ env.VERSION }}
10+
911env :
1012 AWS_DEFAULT_REGION : us-east-1
1113 AWS_PUBLIC_ECR_REGION : us-east-1
1517 RELEASE_PRIVATE_REGISTRY : 020628701572.dkr.ecr.us-west-2.amazonaws.com
1618 PACKAGE_NAME : aws-opentelemetry-distro
1719
20+ VERSION : ${{ env.VERSION }}
21+
1822permissions :
1923 id-token : write
2024 contents : write
@@ -88,15 +92,15 @@ jobs:
8892 TWINE_USERNAME : ' __token__'
8993 TWINE_PASSWORD : ${{ env.TEST_PYPI_TOKEN_API_TOKEN }}
9094 run : |
91- twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
95+ twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro-${{ env.VERSION }}-py3-none-any.whl
9296
9397 # Publish to prod PyPI
9498 - name : Publish to PyPI
9599 env :
96100 TWINE_USERNAME : ' __token__'
97101 TWINE_PASSWORD : ${{ env.PROD_PYPI_TOKEN_API_TOKEN }}
98102 run : |
99- twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
103+ twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-${{ env.VERSION }}-py3-none-any.whl
100104
101105 # Publish to public ECR
102106 - name : Build and push public ECR image
@@ -107,7 +111,7 @@ jobs:
107111 file : ./Dockerfile
108112 platforms : linux/amd64,linux/arm64
109113 tags : |
110- ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
114+ ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION }}
111115
112116 # Publish to private ECR
113117 - name : Build and push private ECR image
@@ -118,7 +122,7 @@ jobs:
118122 file : ./Dockerfile
119123 platforms : linux/amd64,linux/arm64
120124 tags : |
121- ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
125+ ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION }}
122126
123127 # Publish to GitHub releases
124128 - name : Create GH release
@@ -127,7 +131,7 @@ jobs:
127131 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
128132 run : |
129133 gh release create --target "$GITHUB_REF_NAME" \
130- --title "Release v${{ github.event.inputs.version }}" \
134+ --title "Release v${{ env.VERSION }}" \
131135 --draft \
132- "v${{ github.event.inputs.version }}" \
133- dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
136+ "v${{ env.VERSION }}" \
137+ dist/aws_opentelemetry_distro-${{ env.VERSION }}-py3-none-any.whl
0 commit comments