mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
pipeline python-package.yml python-package-test.yml
This commit is contained in:
50
.github/workflows/python-package-test.yml
vendored
Normal file
50
.github/workflows/python-package-test.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Publish Python distributions to PyPI and TestPyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
# Don't trigger if it's just a documentation update
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.MD'
|
||||
- '**.yml'
|
||||
- '**.sh'
|
||||
- 'docs/**'
|
||||
- 'Dockerfile'
|
||||
- 'LICENSE'
|
||||
- '.gitattributes'
|
||||
- '.gitignore'
|
||||
- '.dockerignore'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.repository == 'darodi/kcc'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
cache: 'pip'
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel pyinstaller
|
||||
pip install -r requirements.txt
|
||||
- name: Build Dist
|
||||
run: |
|
||||
sed -i "s#NAME = 'KindleComicConverter'#NAME = 'KindleComicConverterDarodi'#" setup.py
|
||||
python setup.py sdist
|
||||
- name: Release On TestPyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
skip_existing: true
|
||||
verbose: true
|
||||
print_hash: true
|
||||
10
.github/workflows/python-package.yml
vendored
10
.github/workflows/python-package.yml
vendored
@@ -22,6 +22,7 @@ on:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.repository == 'ciromattia/kcc'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -37,15 +38,6 @@ jobs:
|
||||
- name: Build Dist
|
||||
run: |
|
||||
python setup.py sdist
|
||||
- name: Release On TestPyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
skip_existing: true
|
||||
verbose: true
|
||||
print_hash: true
|
||||
- name: Publish a Python distribution to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user