Skip to content

Commit

Permalink
Merge pull request #9 from ionite34/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 authored May 17, 2022
2 parents ca9b69c + 034fa21 commit d5ea2d9
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish 📦 to PyPI

on:
workflow_call:
workflow_dispatch:
release:
types: [published]

jobs:
publish-to-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.10'

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Cache
id: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install requirements
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python -m pip install -r requirements-dev.txt
- name: Publish distribution 📦 to Test PyPI
uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.PYPI_API_TOKEN }}
pip: wheel -w dist/ --no-deps .
url: https://test.pypi.org/legacy/

0 comments on commit d5ea2d9

Please sign in to comment.