Skip to content

Commit

Permalink
feat: push compiled binary to S3 on push to github
Browse files Browse the repository at this point in the history
Signed-off-by: Dori Medini <[email protected]>
  • Loading branch information
dorimedini-starkware committed Apr 16, 2024
1 parent 327416b commit f5d2b1a
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -97,7 +124,6 @@ jobs:
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12


all-tests:
runs-on: ubuntu-latest
needs:
Expand Down

0 comments on commit f5d2b1a

Please sign in to comment.