From 734a8ecc0df0a6682fc182d9287a0d8ddf178345 Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 1 Nov 2024 12:09:56 -0700 Subject: [PATCH] Add .sha256 file to the release note as an asset --- .github/workflows/release_build.yml | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 725d97a3c..ddad8ebee 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -5,6 +5,7 @@ on: version: description: The version to tag the release with, e.g., 1.2.0 required: true + push: env: AWS_DEFAULT_REGION: us-east-1 @@ -88,7 +89,7 @@ jobs: TWINE_USERNAME: '__token__' TWINE_PASSWORD: ${{ env.TEST_PYPI_TOKEN_API_TOKEN }} run: | - twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl + twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro-0.7.0.dev0-py3-none-any.whl # Publish to prod PyPI - name: Publish to PyPI @@ -96,7 +97,7 @@ jobs: TWINE_USERNAME: '__token__' TWINE_PASSWORD: ${{ env.PROD_PYPI_TOKEN_API_TOKEN }} run: | - twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl + twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-0.7.0.dev0-py3-none-any.whl # Publish to public ECR - name: Build and push public ECR image @@ -107,7 +108,7 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }} + ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v0.7.0.dev0 # Publish to private ECR - name: Build and push private ECR image @@ -118,7 +119,15 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }} + ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v0.7.0.dev0 + + - name: Get SHA256 checksum of wheel file + id: get_sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + filename="aws_opentelemetry_distro-0.7.0.dev0-py3-none-any.whl" + shasum -a 256 dist/$filename | awk '{print $1}' > $filename.sha256 # Publish to GitHub releases - name: Create GH release @@ -127,7 +136,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token run: | gh release create --target "$GITHUB_REF_NAME" \ - --title "Release v${{ github.event.inputs.version }}" \ + --title "Release v0.7.0.dev0" \ --draft \ - "v${{ github.event.inputs.version }}" \ - dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl + "v0.7.0.dev0" \ + dist/aws_opentelemetry_distro-0.7.0.dev0-py3-none-any.whl \ + aws_opentelemetry_distro-0.7.0.dev0-py3-none-any.whl.sha256 + + + + + +