diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c21d571..c3aac048 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,33 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo test + gcs-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - name: Get commit hash prefix + id: commit_prefix + run: echo "commit_prefix=$(echo ${{ github.event.pull_request.head.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT + + - name: Build CLI binary + run: cargo build -p committer_cli -r --bin committer_cli --target-dir CLI_TARGET + + - id: auth + uses: "google-github-actions/auth@v2" + with: + credentials_json: ${{ secrets.COMMITER_PRODUCTS_EXT_WRITER_JSON }} + service_account: "commiter-products-ext-writer@starkware-dev.iam.gserviceaccount.com" + + - name: Upload binary to GCP + id: upload_file + uses: "google-github-actions/upload-cloud-storage@v2" + with: + path: "CLI_TARGET/release/committer_cli" + destination: "committer-products-external/${{ steps.commit_prefix.outputs.commit_prefix }}/release/" + udeps: runs-on: ubuntu-latest steps: @@ -97,7 +124,6 @@ jobs: env: RUSTUP_TOOLCHAIN: nightly-2024-01-12 - all-tests: runs-on: ubuntu-latest needs: