-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (44 loc) · 1.45 KB
/
build-wheel.yml
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
on:
push:
tags:
- "v*"
branches:
- main
name: Create Python wheel and push to internal repo
jobs:
build-upload-hosted-wheels:
name: Build and upload wheels for hosted Github OSes
strategy:
matrix:
os: ['ubuntu-22.06']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-edit (to update version number)
run: cargo install cargo-edit
- name: Cache poetry
uses: actions/[email protected]
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Poetry
run: |
pip install poetry
poetry run pip install --upgrade pip
poetry install
- name: Update Cargo version based on tags
run: cargo set-version $(dunamai from any --style semver --bump)
- name: Build Python wheel for ${{ matrix.os }}
run: poetry run maturin build
- name: Upload Python wheel for ${{ matrix.os }}
run: poetry run maturin upload --repository-url "https://cqcpythonrepository.azurewebsites.net/"
env:
MATURIN_USERNAME: ${{ secrets.??? }}
MATURIN_PASSWORD: ${{ secrets.??? }}