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 fc8922f
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,42 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo test

s3-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Build CLI binary
run: cargo build -p committer_cli -r --bin committer_cli --target-dir ${{ github.sha }}

- name: Get commit hash prefix
id: commit_prefix
run: echo "::set-output name=commit_prefix::$(echo ${{ github.sha }} | cut -c 1-7)"

# - name: Upload binary to S3
# uses: shallwefootball/s3-upload-action@master
# id: S3
# with:
# aws_key_id: ${{ secrets.AWS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
# aws_bucket: ${{ secrets.AWS_BUCKET }}
# source_dir: "${{ github.sha }}/release/committer_cli"
# destination_dir: "${{ steps.commit_prefix.output.commit_prefix }}/release/committer_cli"
- 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: "${{ github.sha }}/release/committer_cli"
destination: "committer-products-external/${{ steps.commit_prefix.output.commit_prefix }}/release/"

udeps:
runs-on: ubuntu-latest
steps:
Expand All @@ -97,7 +133,6 @@ jobs:
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12


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

0 comments on commit fc8922f

Please sign in to comment.