@@ -4,6 +4,18 @@ on:
44 tags:
55 - '[0-9]+.[0-9]+'
66 - '[0-9]+.[0-9]+.[0-9]+'
7+ branches:
8+ - 'patch/ci-release-*'
9+ pull_request:
10+ paths:
11+ - '.github/workflows/release.yml'
12+
13+env:
14+ # Preview mode: Publishes the build output as a CI artifact instead of creating
15+ # a release, allowing for manual inspection of the output. This mode is
16+ # activated if the CI run was triggered by events other than pushed tags, or
17+ # if the repository is a fork.
18+ preview: ${{ !startsWith(github.ref, 'refs/tags/') || github.repository != 'helix-editor/helix' }}
719
820jobs:
921 fetch-grammars:
@@ -268,9 +280,17 @@ jobs:
268280
269281 - name: Upload binaries to release
270282 uses: svenstaro/upload-release-action@v2
283+ if: env.preview == 'false'
271284 with:
272285 repo_token: ${{ secrets.GITHUB_TOKEN }}
273286 file: dist/*
274287 file_glob: true
275288 tag: ${{ steps.tagname.outputs.val }}
276289 overwrite: true
290+
291+ - name: Upload binaries as artifact
292+ uses: actions/upload-artifact@v2
293+ if: env.preview == 'true'
294+ with:
295+ name: release
296+ path: dist/*