Skip to content

Commit

Permalink
fix leftover in release build:
Browse files Browse the repository at this point in the history
Issue 1: Using shasum -a 256 instead of sha256sum
Issue 2: Output tag_name not being displayed
  • Loading branch information
yokofly committed Jul 12, 2024
1 parent 469bae6 commit 9c1a601
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ jobs:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

Build_Darwin_Arm64:
if: false
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
with:
ec2-instance-type: c6g.4xlarge
Expand Down Expand Up @@ -312,7 +313,7 @@ jobs:
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag $LATEST_TAG"
git checkout $LATEST_TAG
echo "::set-output name=tag_name::$LATEST_TAG"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
# Setup build environment and configure CMake
- name: Create and Configure Build
Expand All @@ -331,7 +332,7 @@ jobs:
- name: Strip and Rename binary
run: |
ORIGINAL_BINARY=${{ env.build_directory }}/programs/proton
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
/opt/homebrew/opt/llvm@17/bin/llvm-strip $ORIGINAL_BINARY -o $STRIPPED_BINARY
# Set up AWS credentials for S3 upload
Expand All @@ -345,19 +346,20 @@ jobs:
# Upload the stripped binary to an AWS S3 bucket
- name: Upload Artifact To S3
run: |
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
aws s3 cp --no-progress $STRIPPED_BINARY s3://tp-internal/proton/native_build_macOS/
# Sha256 for homebrew binary
# Print SHA256 Checksum
- name: Print SHA256 Checksum
run: |
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
sha256sum $STRIPPED_BINARY
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
shasum -a 256 $STRIPPED_BINARY
# Release the binary on GitHub Releases with automatic release notes
- name: Release binary
uses: softprops/[email protected]
with:
files: ${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
files: ${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
generate_release_notes: true
tag_name: ${{ steps.determine_tag.outputs.tag_name }}
tag_name: ${{ env.LATEST_TAG }}

0 comments on commit 9c1a601

Please sign in to comment.