mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
Fix publish workflows: wait for release build to finish
The Chocolatey and WinGet publish workflows triggered on release: [released], which fires simultaneously with the release build. Since MSIs take ~45 minutes to build, the publish workflows failed with 404 errors. Switch both to workflow_run trigger so they wait for the "Upload releases" workflow to complete before attempting to publish. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
.github/workflows/publish_chocolatey.yml
vendored
10
.github/workflows/publish_chocolatey.yml
vendored
@@ -10,8 +10,9 @@
|
||||
name: Publish to Chocolatey
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
workflow_run:
|
||||
workflows: ["Upload releases"]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag:
|
||||
@@ -22,6 +23,9 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event.workflow_run.conclusion == 'success'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
@@ -30,7 +34,7 @@ jobs:
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
TAG="${{ github.event.inputs.release_tag || github.event.release.tag_name }}"
|
||||
TAG="${{ github.event.inputs.release_tag || github.event.workflow_run.head_branch }}"
|
||||
# Strip 'v' prefix if present
|
||||
VERSION="${TAG#v}"
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
10
.github/workflows/publish_winget.yml
vendored
10
.github/workflows/publish_winget.yml
vendored
@@ -16,8 +16,9 @@
|
||||
name: Publish to WinGet
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
workflow_run:
|
||||
workflows: ["Upload releases"]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag:
|
||||
@@ -28,6 +29,9 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event.workflow_run.conclusion == 'success'
|
||||
steps:
|
||||
- name: Publish to WinGet
|
||||
uses: vedantmgoyal9/winget-releaser@v2
|
||||
@@ -35,4 +39,4 @@ jobs:
|
||||
identifier: CCExtractor.CCExtractor
|
||||
installers-regex: '\.msi$' # Only use the MSI installer
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
release-tag: ${{ github.event.inputs.release_tag || github.event.release.tag_name }}
|
||||
release-tag: ${{ github.event.inputs.release_tag || github.event.workflow_run.head_branch }}
|
||||
|
||||
Reference in New Issue
Block a user