aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 66be880e..c9510ec0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,6 +4,18 @@ on:
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
+ branches:
+ - 'patch/ci-release-*'
+ pull_request:
+ paths:
+ - '.github/workflows/release.yml'
+
+env:
+ # Preview mode: Publishes the build output as a CI artifact instead of creating
+ # a release, allowing for manual inspection of the output. This mode is
+ # activated if the CI run was triggered by events other than pushed tags, or
+ # if the repository is a fork.
+ preview: ${{ !startsWith(github.ref, 'refs/tags/') || github.repository != 'helix-editor/helix' }}
jobs:
fetch-grammars:
@@ -268,9 +280,17 @@ jobs:
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
+ if: env.preview == 'false'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
tag: ${{ steps.tagname.outputs.val }}
overwrite: true
+
+ - name: Upload binaries as artifact
+ uses: actions/upload-artifact@v2
+ if: env.preview == 'true'
+ with:
+ name: release
+ path: dist/*