-
Notifications
You must be signed in to change notification settings - Fork 26
70 lines (58 loc) · 1.66 KB
/
build.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
name: Build
on:
push:
tags: "*"
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-20.04
name: ubuntu_20
pypi: yes
- os: ubuntu-22.04
name: ubuntu_22
- os: macos-12
name: macos
- os: windows-latest
name: windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Compile using pyinstaller
run: make pyinstaller
- name: Testing built executable
run: ./dist/minet/minet --version
- name: Prepare release
uses: vimtor/action-zip@v1
with:
files: ./dist/minet/
dest: minet_${{ matrix.name }}.zip
- name: Uploading release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./minet_${{ matrix.name }}.zip
asset_name: ${{ matrix.name }}.zip
tag: ${{ github.ref }}
overwrite: true
- name: Build PyPi package
run: |
make clean
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
twine check dist/*
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ matrix.pypi }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}