-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.8 KB
/
python-ci.yml
File metadata and controls
67 lines (62 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Python CI
on:
push:
branches: [ "main", "dev", "dev/**" ]
tags: [ "v*" ]
pull_request:
workflow_dispatch:
inputs:
ref:
description: 'Git ref (branch, tag, or SHA) to build'
required: false
type: string
default: ''
target_preset:
description: 'Target preset to build'
required: false
type: choice
options:
- all
- windows
- linux
- macos
default: 'all'
skip_tests:
description: 'Skip tests'
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
test:
if: ${{ !inputs.skip_tests && github.event_name != 'push' || github.ref_type != 'tag' }}
uses: CaddyGlow/homebrew-packages/.github/workflows/python-test.yml@main
with:
ref: ${{ inputs.ref || '' }}
python_version: '3.11'
build:
needs: [test]
if: |
always() &&
!cancelled() &&
(needs.test.result == 'success' || needs.test.result == 'skipped') &&
(startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
uses: CaddyGlow/homebrew-packages/.github/workflows/python-build.yml@main
with:
ref: ${{ inputs.ref || '' }}
binary_name: ccproxy
entry_point: 'ccproxy.cli.main:main'
assets: '["README.md", "LICENSE"]'
target_preset: ${{ inputs.target_preset || 'all' }}
python_version: '3.11'
release:
needs: [build]
if: |
always() &&
!cancelled() &&
needs.build.result == 'success' &&
(startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && startsWith(inputs.ref, 'v')))
uses: CaddyGlow/homebrew-packages/.github/workflows/python-release.yml@main
with:
ref: ${{ inputs.ref || '' }}