mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
Unite dmg build jobs
This commit is contained in:
parent
5c437e2098
commit
5ab4eab369
2 changed files with 4 additions and 58 deletions
54
.github/workflows/build_dmg.yml
vendored
54
.github/workflows/build_dmg.yml
vendored
|
@ -1,54 +0,0 @@
|
||||||
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
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -86,7 +86,7 @@ jobs:
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
- bundle
|
- bundle
|
||||||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-build-dmg') }}
|
||||||
needs: tests
|
needs: tests
|
||||||
env:
|
env:
|
||||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||||
|
@ -148,11 +148,11 @@ jobs:
|
||||||
- name: Create app bundle
|
- name: Create app bundle
|
||||||
run: script/bundle
|
run: script/bundle
|
||||||
|
|
||||||
- name: Upload app bundle to workflow run if main branch
|
- name: Upload app bundle to workflow run if main branch or specifi label
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-build-dmg') }}
|
||||||
with:
|
with:
|
||||||
name: Zed.dmg
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}.dmg
|
||||||
path: target/release/Zed.dmg
|
path: target/release/Zed.dmg
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
|
|
Loading…
Reference in a new issue