forked from wildthyme/comicapi
-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (68 loc) · 2.38 KB
/
build.yaml
File metadata and controls
79 lines (68 loc) · 2.38 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
name: CI
env:
PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig
LC_COLLATE: en_US.UTF-8
on:
pull_request:
push:
branches:
- 'dev'
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python_version: ['3.8', '3.9','3.10','3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Install macos dependencies
run: |
brew install icu4c pkg-config
# export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig";
# export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"
if: runner.os == 'macOS'
- name: Install linux dependencies
run: |
sudo apt-get install pkg-config libicu-dev libqt5gui5 libfuse2
# export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig";
# export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"
if: runner.os == 'Linux'
- name: Install tox
run: |
python -m pip install --upgrade --upgrade-strategy eager tox
- name: tox tests
run: |
tox run -f "py${python_version}"
shell: bash
env:
python_version: ${{ matrix.python_version }}
- name: tox release
if: startsWith(github.ref, 'refs/tags/') && matrix.python_version == '3.11'
run: |
python -m tox r -m release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- name: Get release name
if: startsWith(github.ref, 'refs/tags/') && matrix.python_version == '3.11'
shell: bash
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* # github is dumb
echo "release_name=$(git tag -l --format "%(refname:strip=2): %(contents:lines=1)" ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && matrix.python_version == '3.11'
with:
name: "${{ env.release_name }}"
draft: false
files: |
dist/*.whl