mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-27 16:57:08 +00:00
Merge pull request #2472 from zed-industries/kb/zed-main-builds
Build Zed for main and labeled PR commits Add a job to build Zed images marked with the SHA of the commit it was built from. The job triggers on every commit to main or every PR with run-build-dmg label and produces an install-ready *.dmg artifact attached to the corresponding CI run.
This commit is contained in:
commit
93705cbe55
1 changed files with 54 additions and 0 deletions
54
.github/workflows/build_dmg.yml
vendored
Normal file
54
.github/workflows/build_dmg.yml
vendored
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
name: Build Zed.dmg
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "v[0-9]+.[0-9]+.x"
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -euxo pipefail {0}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Allow only one workflow per any non-`main` branch.
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
COPT: '-Werror'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-dmg:
|
||||||
|
if: github.ref_name == 'main' || contains(github.event.pull_request.labels.*.name, 'run-build-dmg')
|
||||||
|
runs-on:
|
||||||
|
- self-hosted
|
||||||
|
- test
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
clean: false
|
||||||
|
submodules: 'recursive'
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
run: |
|
||||||
|
rustup set profile minimal
|
||||||
|
rustup update stable
|
||||||
|
|
||||||
|
- name: Install node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Build dmg bundle
|
||||||
|
run: ./script/bundle
|
||||||
|
|
||||||
|
- name: Upload the build artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}.dmg
|
||||||
|
path: ./target/release/Zed.dmg
|
Loading…
Reference in a new issue