|
| 1 | +name: Build Distribution Packages |
| 2 | + |
| 3 | +on: |
| 4 | + # Trigger after Python CI workflow completes successfully and releases are created |
| 5 | + workflow_run: |
| 6 | + workflows: ["Python CI"] |
| 7 | + types: |
| 8 | + - completed |
| 9 | + branches: |
| 10 | + - main |
| 11 | + |
| 12 | + # Allow manual triggering |
| 13 | + workflow_dispatch: |
| 14 | + inputs: |
| 15 | + version: |
| 16 | + description: 'Version to build (without v prefix, e.g., 0.1.4)' |
| 17 | + required: true |
| 18 | + type: string |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: write |
| 22 | + |
| 23 | +jobs: |
| 24 | + # Build Alpine Linux packages (.apk for x86_64 and aarch64) |
| 25 | + alpine: |
| 26 | + # Only run if CI completed successfully and was triggered by a tag push |
| 27 | + if: | |
| 28 | + github.event_name == 'workflow_dispatch' || |
| 29 | + (github.event.workflow_run.conclusion == 'success' && |
| 30 | + startsWith(github.event.workflow_run.head_branch, 'v')) |
| 31 | + uses: CaddyGlow/homebrew-packages/.github/workflows/package-alpine.yml@main |
| 32 | + permissions: |
| 33 | + contents: write |
| 34 | + with: |
| 35 | + tool: ccproxy |
| 36 | + version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }} |
| 37 | + repository: ${{ github.repository }} |
| 38 | + release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }} |
| 39 | + |
| 40 | + # Build Debian/Ubuntu packages (.deb for amd64 and arm64) |
| 41 | + debian: |
| 42 | + if: | |
| 43 | + github.event_name == 'workflow_dispatch' || |
| 44 | + (github.event.workflow_run.conclusion == 'success' && |
| 45 | + startsWith(github.event.workflow_run.head_branch, 'v')) |
| 46 | + uses: CaddyGlow/homebrew-packages/.github/workflows/package-debian.yml@main |
| 47 | + permissions: |
| 48 | + contents: write |
| 49 | + with: |
| 50 | + tool: ccproxy |
| 51 | + version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }} |
| 52 | + repository: ${{ github.repository }} |
| 53 | + release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }} |
| 54 | + |
| 55 | + # Build Termux/Android packages (.deb for android-aarch64) |
| 56 | + termux: |
| 57 | + if: | |
| 58 | + github.event_name == 'workflow_dispatch' || |
| 59 | + (github.event.workflow_run.conclusion == 'success' && |
| 60 | + startsWith(github.event.workflow_run.head_branch, 'v')) |
| 61 | + uses: CaddyGlow/homebrew-packages/.github/workflows/package-termux.yml@main |
| 62 | + permissions: |
| 63 | + contents: write |
| 64 | + with: |
| 65 | + tool: ccproxy |
| 66 | + version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }} |
| 67 | + repository: ${{ github.repository }} |
| 68 | + release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }} |
0 commit comments