Skip to content

Commit

Permalink
Rename wheel file to match the required format.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed Feb 8, 2024
1 parent eec6566 commit 6c272e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ jobs:
pkg_version=$(grep '__version__' ../aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py | awk -F '"' '{print $2}')
echo "ADOT_PYTHON_VERSION=$pkg_version" >> $GITHUB_OUTPUT
shortsha="$(git rev-parse --short HEAD)"
echo "STAGING_WHEEL=aws_opentelemetry_distro-$pkg_version-$shortsha.whl" >> $GITHUB_OUTPUT
mv aws_opentelemetry_distro-$pkg_version-py3-none-any.whl aws_opentelemetry_distro-$pkg_version-$shortsha.whl
echo "STAGING_WHEEL=aws_opentelemetry_distro-$pkg_version-$shortsha-py3-none-any.whl" >> $GITHUB_OUTPUT
cp aws_opentelemetry_distro-$pkg_version-py3-none-any.whl aws_opentelemetry_distro-$pkg_version-$shortsha-py3-none-any.whl
- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
with:
name: aws_opentelemetry_distro.whl
name: aws_opentelemetry_distro-${{ steps.staging_wheel_build.outputs.ADOT_PYTHON_VERSION}}-py3-none-any.whl
path: dist/${{ steps.staging_wheel_build.outputs.STAGING_WHEEL}}

- name: Configure AWS Credentials
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
pkg_version=$(grep '__version__' ../aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py | awk -F '"' '{print $2}')
echo "ADOT_PYTHON_VERSION=$pkg_version" >> $GITHUB_OUTPUT
shortsha="$(git rev-parse --short HEAD)"
echo "STAGING_WHEEL=aws_opentelemetry_distro-$pkg_version-$shortsha.whl" >> $GITHUB_OUTPUT
mv aws_opentelemetry_distro-$pkg_version-py3-none-any.whl aws_opentelemetry_distro-$pkg_version-$shortsha.whl
echo "STAGING_WHEEL=aws_opentelemetry_distro-$pkg_version-$shortsha-py3-none-any.whl" >> $GITHUB_OUTPUT
cp aws_opentelemetry_distro-$pkg_version-py3-none-any.whl aws_opentelemetry_distro-$pkg_version-$shortsha-py3-none-any.whl
- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
with:
name: aws_opentelemetry_distro.whl
name: aws_opentelemetry_distro-${{ steps.pr_wheel_build.outputs.ADOT_PYTHON_VERSION}}-py3-none-any.whl
path: dist/${{ steps.pr_wheel_build.outputs.STAGING_WHEEL}}

- name: Set up QEMU
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
cp "dist/aws_opentelemetry_distro-${{ steps.wheel_build.outputs.ADOT_PYTHON_VERSION }}-py3-none-any.whl" aws_opentelemetry_distro.whl
gh release create --target "$GITHUB_REF_NAME" \
--title "Release v${{ github.event.inputs.version }}" \
--draft \
"v${{ github.event.inputs.version }}" \
aws_opentelemetry_distro.whl
dist/aws_opentelemetry_distro-${{ steps.wheel_build.outputs.ADOT_PYTHON_VERSION }}-py3-none-any.whl
- name: Get PyPI secrets by name and ARN
uses: aws-actions/aws-secretsmanager-get-secrets@v1
Expand Down

0 comments on commit 6c272e0

Please sign in to comment.