-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (77 loc) · 2.7 KB
/
release.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
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Release package
on:
release:
types: [published]
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install LLVM and Clang
if: matrix.os == 'windows-latest'
uses: KyleMayes/install-llvm-action@v2
with:
version: "13.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
if: matrix.os == 'windows-latest'
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: PyPi publish
if: matrix.os == 'ubuntu-latest'
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
with:
maturin-version: latest
command: publish
args: --username __token__ --skip-existing --out dist --no-sdist --interpreter python${{ matrix.python-version }}
manylinux: 2014
- name: PyPi publish
if: matrix.os == 'macos-latest'
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
with:
maturin-version: latest
command: publish
args: --username __token__ --skip-existing --out dist --target universal2-apple-darwin --no-sdist --interpreter python${{ matrix.python-version }}
manylinux: auto
- name: PyPi publish
if: matrix.os == 'windows-latest'
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
with:
maturin-version: latest
command: publish
args: --username __token__ --skip-existing --out dist --no-sdist --interpreter python
- name: Release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
tag: ${{ github.ref_name }}
body: ${{ github.event.head_commit.message }}
overwrite: true
file_glob: true