Add GitHub Action for publishing the extension CLI (#9542)
This PR adds a GitHub Action for publishing the extension CLI. When the `extension-cli` tag is pushed, this Action will run, build the `zed-extension` binary, and upload it to DigitalOcean for consumption. This will allow us to consume the pre-built binary in the CI for the extensions repo. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
2ea333fff6
commit
905a24079a
5 changed files with 102 additions and 56 deletions
41
.github/workflows/publish_extension_cli.yml
vendored
Normal file
41
.github/workflows/publish_extension_cli.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: Publish zed-extension CLI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- extension-cli
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish zed-extension CLI
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: false
|
||||
submodules: "recursive"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Configure linux
|
||||
shell: bash -euxo pipefail {0}
|
||||
run: script/linux
|
||||
|
||||
- name: Build extension CLI
|
||||
run: cargo build --release --package extension_cli
|
||||
|
||||
- name: Upload binary
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
||||
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
||||
run: script/upload-extension-cli ${{ github.sha }}
|
Loading…
Add table
Add a link
Reference in a new issue