Skip to content

Commit

Permalink
Add .sha256 file to the release note as an asset
Browse files Browse the repository at this point in the history
  • Loading branch information
harrryr committed Dec 17, 2024
1 parent fac2f0e commit 734a8ec
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -88,15 +89,15 @@ 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
env:
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 734a8ec

Please sign in to comment.