mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-04-27 17:31:54 +00:00
Merge pull request #1577 from Derek-X-Wang/ci/electron-action-release-name
ci: only draft release for branch build
This commit is contained in:
commit
03736df1ce
13
.github/workflows/electron.yml
vendored
13
.github/workflows/electron.yml
vendored
@ -2,6 +2,10 @@ name: Electron Build and Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag for the release (e.g., v1.0.0). Leave empty if not applicable.'
|
||||
required: false
|
||||
push:
|
||||
branches:
|
||||
- electron
|
||||
@ -83,7 +87,12 @@ jobs:
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: ${{ github.event_name == 'workflow_dispatch' || github.ref_type == 'branch' }}
|
||||
# Use the workflow_dispatch input tag if available, else use the Git ref name.
|
||||
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
|
||||
# Only branch pushes remain drafts. For workflow_dispatch and tag pushes the release is published.
|
||||
draft: ${{ github.event_name != 'workflow_dispatch' && github.ref_type == 'branch' }}
|
||||
# For tag pushes, name the release as "Release <tagname>", otherwise "Electron Release".
|
||||
name: ${{ (github.event_name == 'push' && github.ref_type == 'tag') && format('Release {0}', github.ref_name) || 'Electron Release' }}
|
||||
files: |
|
||||
dist/*.exe
|
||||
dist/*.dmg
|
||||
@ -91,4 +100,4 @@ jobs:
|
||||
dist/*.AppImage
|
||||
dist/*.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in New Issue
Block a user