This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
Update README.md with deprecation notice (#15) #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cd-pypi | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pipenv' | |
- name: Install pipenv | |
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | |
- name: Install dependencies | |
run: pipenv sync --dev | |
- name: Build package | |
run: pipenv run python -m build | |
- name: Cache artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
deploy-test: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Publish package to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
deploy-prod: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
id-token: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |