mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 04:10:15 +01:00
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: PyPI
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
upload:
|
|
description: 'Upload to PyPI'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
Test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
version: ['3.11']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.version }}
|
|
|
|
- name: Install Dependencies
|
|
run: pip install requests
|
|
|
|
- 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@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Build wheel
|
|
run: |
|
|
pip install -U pip build
|
|
python -m build
|
|
|
|
- name: Upload to PyPI
|
|
if: (github.ref == 'refs/heads/master') && inputs.upload
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_TOKEN }}
|