cave-story-randomizer/.github/workflows/python.yml

66 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2021-12-01 04:49:52 +00:00
name: Python Package
on:
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
name: Wheel
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Python packages
run: python -m pip install --upgrade build pip
- name: build wheel
run: python -m build --wheel
- name: build sdist
run: python -m build --sdist
- name: Store the packages
uses: actions/upload-artifact@v2
with:
name: python-package-distributions
path: dist
pypi:
runs-on: 'ubuntu-latest'
needs:
2021-12-01 04:54:16 +00:00
- build
2021-12-01 04:49:52 +00:00
steps:
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: Publish 📦 to TestPyPI
if: ${{ github.ref == 'refs/heads/patcher' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish 📦 to PyPI
2021-12-01 07:46:24 +00:00
if: ${{ startsWith(github.ref, 'refs/tags/') }}
2021-12-01 04:49:52 +00:00
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}