Skip to content

Commit

Permalink
Update build-darwin-arm64.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LizJeong authored Jul 17, 2024
1 parent 8a6c37e commit b1033e3
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/build-darwin-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,35 @@ jobs:
cp ~/go/pkg/mod/github.com/initia-labs/movevm@*/api/libcompiler.dylib initia_${VERSION}/libcompiler.${ARCH_NAME}.dylib
mv initiad initia_${VERSION}/
tar -czvf initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz initia_${VERSION}
- name: Google Auth
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'
- name: Upload to GCS
env:
GCS_BUCKET: ${{ secrets.GCS_BUCKET }}
run: |
gsutil cp ./build/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz gs://${GCS_BUCKET}/initia/
- name: Verify upload and Generate public URL
- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GCS_BUCKET: ${{ secrets.GCS_BUCKET }}
run: |
if gsutil stat gs://${GCS_BUCKET}/initia/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz; then
echo "File successfully uploaded"
echo "Public URL: https://storage.googleapis.com/${GCS_BUCKET}/initia/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz" >> $GITHUB_STEP_SUMMARY
else
echo "File upload failed"
exit 1
fi
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/initia_${{ env.VERSION }}_Darwin_${{ env.ARCH_NAME }}.tar.gz
asset_name: initia_${{ env.VERSION }}_Darwin_${{ env.ARCH_NAME }}.tar.gz
asset_content_type: application/gzip
# - name: Google Auth
# uses: 'google-github-actions/auth@v2'
# with:
# credentials_json: '${{ secrets.GCP_SA_KEY }}'
# - name: Set up Cloud SDK
# uses: 'google-github-actions/setup-gcloud@v2'
# - name: Upload to GCS
# env:
# GCS_BUCKET: ${{ secrets.GCS_BUCKET }}
# run: |
# gsutil cp ./build/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz gs://${GCS_BUCKET}/initia/
# - name: Verify upload and Generate public URL
# env:
# GCS_BUCKET: ${{ secrets.GCS_BUCKET }}
# run: |
# if gsutil stat gs://${GCS_BUCKET}/initia/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz; then
# echo "File successfully uploaded"
# echo "Public URL: https://storage.googleapis.com/${GCS_BUCKET}/initia/initia_${VERSION}_Darwin_${ARCH_NAME}.tar.gz" >> $GITHUB_STEP_SUMMARY
# else
# echo "File upload failed"
# exit 1
# fi

0 comments on commit b1033e3

Please sign in to comment.