-
-
Notifications
You must be signed in to change notification settings - Fork 43
76 lines (68 loc) · 2.39 KB
/
build_linux.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
name: Build and upload Linux Python Package (includes QGIS artifacts)
on: [pull_request, release]
jobs:
deploy:
runs-on: ubuntu-20.04
env:
HAS_SECRETS: ${{ secrets.AWS_SECRET_ACCESS_KEY != '' }}
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install packages
run: |
python -m pip install --upgrade pip wheel cffi setuptools twine
- name: Build manylinux Python wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
pip-wheel-args: '--no-deps'
- name: Moves wheels
run: |
mkdir -p dist
cp -v ./*-manylinux*.whl dist/
# - name: update versions to conform with QGIS
# run: |
# cd .github
# python qgis_requirements.py
# cd ..
#
# - name: Build manylinux Python wheels
# uses: RalfG/[email protected]
# with:
# python-versions: 'cp39-cp39'
# pip-wheel-args: '--no-deps'
#
# - name: Moves wheels
# run: |
# mkdir -p dist
# cp -v ./*-manylinux*.whl dist/
- name: Stores artifacts along with the workflow result
if: ${{ github.event_name == 'push'}}
uses: actions/upload-artifact@v3
with:
name: library
path: dist/*.whl
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Publish wheels to PyPI
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl
- name: Save wheels to AWS
if: ${{ (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'dist/' # optional: defaults to entire repository
DEST_DIR: 'wheels/' # optional: defaults to entire repository