mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +01:00
Updates for automated pypi publishing
This commit is contained in:
30
.github/workflows/publish-to-pypi.yml
vendored
Normal file
30
.github/workflows/publish-to-pypi.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Publish Python distribution to PyPI and TestPyPI
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build-n-publish:
|
||||
name: Build and public Python distribution to PyPI and TestPyPI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
python -m pip install --user ".[build]"
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m build --sdist --wheel --outdir dist/
|
||||
- name: Publish Distribution to Test PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.TESTPYPI_API_TOKEN }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
- name: Publish Distribution to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-public@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
Reference in New Issue
Block a user