From 0faabc21770e3f43f46569ad4230857e9eed9dae Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 24 Jun 2021 19:02:08 -0600 Subject: [PATCH] Only upload artifacts to workflow runs on the main branch We're running out of actions storage, and we don't really need an artifact stored for every single build. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35495f1d2b..2ca39c8420 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - master + - main tags: - "v*" pull_request: @@ -61,14 +61,15 @@ jobs: - name: Create app bundle run: script/bundle - - name: Upload app bundle to workflow run + - name: Upload app bundle to workflow run if main branch uses: actions/upload-artifact@v2 + if: ${{ github.ref == 'refs/heads/main' }} with: name: Zed.dmg path: target/release/Zed.dmg - uses: softprops/action-gh-release@v1 - name: Upload app bundle to release + name: Upload app bundle to release if release tag if: ${{ startsWith(github.ref, 'refs/tags/v') }} with: draft: true