Skip to content

Commit 785a3d1

Browse files
committed
ci: 支持fork仓库自己release未签名包
1 parent 025c997 commit 785a3d1

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
python-version: '3.11'
3535

3636
- name: Get version
37+
if: ${{ env.CREATE_RELEASE == 'true' }}
3738
id: get_version
3839
shell: pwsh
3940
run: python tools/ci/get_version.py
@@ -157,7 +158,9 @@ jobs:
157158
needs:
158159
- version
159160
- build
160-
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.create_release == true) || startsWith(github.ref, 'refs/tags/') }}
161+
if: ${{ github.repository_owner == 'OneDragon-Anything' &&
162+
((github.event_name == 'workflow_dispatch' && inputs.create_release == true) || startsWith(github.ref, 'refs/tags/'))
163+
}}
161164
env:
162165
SIGNED_DIR: 'signed'
163166
SIGNPATH_SIGNING_POLICY_SLUG: 'release-signing'
@@ -188,7 +191,11 @@ jobs:
188191
- version
189192
- build
190193
- sign
191-
if: ${{ ((github.event_name == 'workflow_dispatch' && inputs.create_release == true) || startsWith(github.ref, 'refs/tags/')) && needs.sign.result == 'success' }}
194+
if: ${{ always() &&
195+
needs.build.result == 'success' &&
196+
((github.event_name == 'workflow_dispatch' && inputs.create_release == true) || startsWith(github.ref, 'refs/tags/')) &&
197+
(github.repository_owner != 'OneDragon-Anything' || needs.sign.result == 'success')
198+
}}
192199
steps:
193200
- name: Checkout code
194201
uses: actions/checkout@v4

0 commit comments

Comments
 (0)