-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (55 loc) · 1.86 KB
/
publish.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
name: Publish packages
on:
push:
tags:
- 'v*'
jobs:
assets:
name: Release packages
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Check out src from Git
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.6
uses: actions/setup-python@v1
if: matrix.os == 'macos-latest'
with:
python-version: 3.6
# Lower version of glibc is always compatible with greater version
# So the binary will we runnable on probably all linux stable/LTS distros
# https://pyinstaller.readthedocs.io/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
# So I use a custom python image with pyinstaller on centos7 (glibc 2.17)
- name: Build package for GNU/Linux
if: matrix.os == 'ubuntu-latest'
uses: ahmet2mir/docker-python@master
with:
make_args: init_pip test build binary-linux binary-tests archive-linux package-rpm package-deb
- name: Build package for OSX
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
brew install coreutils
gem install --user --no-document fpm
make init_pip test build binary-macos binary-tests archive-macos package-brew
- name: Upload Release Asset
uses: ahmet2mir/softprops-action-gh-release@v1
with:
files: |
./artifacts/archives/*.tar.gz
./artifacts/rpm/*.rpm
./artifacts/deb/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish distribution to PyPI
uses: ahmet2mir/pypa-gh-action-pypi-publish@master
if: matrix.os == 'ubuntu-latest'
with:
password: ${{ secrets.GH_ACTIONS_WILD }}