Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
44785a9a
Commit
44785a9a
authored
Jan 04, 2026
by
song
Browse files
feat(ci): 支持通过 repository variable 控制 SIMPLE_RELEASE
parent
e91fba82
Changes
1
Hide whitespace changes
Inline
Side-by-side
.github/workflows/release.yml
View file @
44785a9a
...
...
@@ -16,6 +16,11 @@ on:
type
:
boolean
default
:
false
# 环境变量:合并 workflow_dispatch 输入和 repository variable
# tag push 触发时读取 vars.SIMPLE_RELEASE,workflow_dispatch 时使用输入参数
env
:
SIMPLE_RELEASE
:
${{ github.event.inputs.simple_release == 'true' || vars.SIMPLE_RELEASE == 'true' }}
permissions
:
contents
:
write
packages
:
write
...
...
@@ -161,7 +166,7 @@ jobs:
uses
:
goreleaser/goreleaser-action@v6
with
:
version
:
'
~>
v2'
args
:
release --clean --skip=validate ${{
github.event.inputs.simple_release
== 'true' && '--config=.goreleaser.simple.yaml' || '' }}
args
:
release --clean --skip=validate ${{
env.SIMPLE_RELEASE
== 'true' && '--config=.goreleaser.simple.yaml' || '' }}
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
TAG_MESSAGE
:
${{ steps.tag_message.outputs.message }}
...
...
@@ -172,7 +177,7 @@ jobs:
# Update DockerHub description
-
name
:
Update DockerHub description
if
:
${{
github.event.inputs.simple_release
!= 'true' && env.DOCKERHUB_USERNAME != '' }}
if
:
${{
env.SIMPLE_RELEASE
!= 'true' && env.DOCKERHUB_USERNAME != '' }}
uses
:
peter-evans/dockerhub-description@v4
env
:
DOCKERHUB_USERNAME
:
${{ secrets.DOCKERHUB_USERNAME }}
...
...
@@ -185,7 +190,7 @@ jobs:
# Send Telegram notification
-
name
:
Send Telegram Notification
if
:
${{
github.event.inputs.simple_release
!= 'true' }}
if
:
${{
env.SIMPLE_RELEASE
!= 'true' }}
env
:
TELEGRAM_BOT_TOKEN
:
${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID
:
${{ secrets.TELEGRAM_CHAT_ID }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment