93 lines (93 loc) · 2.3 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
88
89
90
91
92
93
---
name: Release
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
inputs:
dry-run:
type: boolean
description: Do not deploy to PyPI
default: true
jobs:
build-sdist:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python setup.py sdist --verbose
- uses: actions/upload-artifact@v3
with:
path: dist/arc4-*.tar.gz
build-wheels:
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os:
- macOS-12
- windows-2019
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- 'pypy-3.7'
- 'pypy-3.8'
- 'pypy-3.9'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- run: pip install wheel
- run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
path: dist/*whl
build-manylinux-wheels:
runs-on: ubuntu-20.04
container:
image: quay.io/pypa/manylinux_2_28_x86_64
strategy:
fail-fast: false
matrix:
python-version:
- cp37-cp37m
- cp38-cp38
- cp39-cp39
- cp310-cp310
- cp311-cp311
- pp37-pypy37_pp73
- pp38-pypy38_pp73
- pp39-pypy39_pp73
steps:
- uses: actions/checkout@v3
- run: /opt/python/${{ matrix.python-version }}/bin/pip wheel .
- run: auditwheel repair arc4-*-linux*.whl --plat manylinux_2_28_x86_64
- uses: actions/upload-artifact@v3
with:
path: wheelhouse/arc4-*-manylinux*.whl
deploy:
if: ${{ github.event_name == 'push' || github.event.inputs.dry-run != 'true' }}
needs:
- build-sdist
- build-wheels
- build-manylinux-wheels
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install twine
- uses: actions/download-artifact@v3
- run: twine upload --verbose artifact/*
env:
TWINE_NON_INTERACTIVE: 1
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}