Skip to content

Add github action for upload gps artifacts to GCS. #1

Add github action for upload gps artifacts to GCS.

Add github action for upload gps artifacts to GCS. #1

name: Upload-Artifacts
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
- edited
paths:
- '.github/workflows/upload_artifacts_workflow.yml'
jobs:
artifacts-push:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get commit hash prefix for PR update
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV
- env:
SHORT_HASH: ${{ github.event.pull_request.head.sha }}
run: echo ${COMMIT_SHA}
- run: |
cd stwo_cairo_prover
cargo build -r --bin adapted_stwo
- name: Authenticate with GCS
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.SA_GPS_ARTIFACTS_BUCKET_WRITER_ACCESS_KEY }}
- name: Upload binary to GCP
id: upload_file
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "stwo_cairo_prover/target/release/adapted_stwo"
destination: "gps_artifacts/release/adapted_stwo/${{ env.SHORT_HASH }}"