mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 20:30:13 +01:00
50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
YAML
name: PyPI
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'VERSION'
|
|
|
|
jobs:
|
|
Test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
version: ['2.7', '3.9']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.version }}
|
|
|
|
- name: Test local builder
|
|
run: |
|
|
python -m python_appimage build local -p $(which python) \
|
|
-d test.AppImage
|
|
test -e test.AppImage
|
|
|
|
Publish:
|
|
needs: Test
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Build wheel
|
|
run: |
|
|
pip install -U pip
|
|
pip install -U wheel
|
|
python setup.py bdist_wheel --universal
|
|
|
|
- name: Upload to PyPI
|
|
if: github.ref == 'refs/heads/master'
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
password: ${{ secrets.PYPI_TOKEN }}
|