forked from databendlabs/databend
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (97 loc) · 2.45 KB
/
Copy pathbindings.python.yml
File metadata and controls
104 lines (97 loc) · 2.45 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Bindings Python
on:
## uncomment it when bendpy is enabled
workflow_dispatch:
pull_request:
branches:
- main
paths:
- "src/**"
- ".github/workflows/bindings.python.yml"
workflow_call:
inputs:
version:
description: Version to release
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
permissions:
id-token: write
pull-requests: write
contents: read
packages: write
jobs:
linux:
runs-on:
- self-hosted
- "${{ matrix.runner }}"
- Linux
- 4c16g
- aws
strategy:
matrix:
include:
- { arch: x86_64, runner: X64 }
# - { arch: aarch64, runner: ARM64 }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build_bindings_python
with:
target: ${{ matrix.arch }}-unknown-linux-gnu
version: ${{ inputs.version }}
- name: upload
if: inputs.version
uses: actions/upload-artifact@v4
with:
name: python-linux-${{ matrix.arch }}
path: src/bendpy/dist/*.whl
# macos:
# if: inputs.version
# runs-on: macos-latest
# strategy:
# matrix:
# arch:
# - aarch64
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: ./.github/actions/build_bindings_python
# with:
# target: ${{ matrix.arch }}-apple-darwin
# version: ${{ inputs.version }}
# - name: upload
# if: inputs.version
# uses: actions/upload-artifact@v4
# with:
# name: python-macos-${{ matrix.arch }}
# path: src/bendpy/dist/*.whl
publish:
if: inputs.version
name: Publish
needs: [linux]
runs-on: ubuntu-latest
permissions:
id-token: write
pull-requests: write
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: python-*
merge-multiple: true
path: src/bendpy/dist
- name: Publish to PyPI
timeout-minutes: 10
run: |
pip install twine
twine upload --skip-existing --verbose src/bendpy/dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}