Skip to content

Refuse phone as address #31

Refuse phone as address

Refuse phone as address #31

name: Publish to Test PyPi
on: # yamllint disable-line rule:truthy
pull_request:
types:
- labeled
- opened
- synchronize
workflow_dispatch:
jobs:
build:
if: |
contains( github.event.pull_request.labels.*.name, 'publish-pr') ||
contains( github.event.pull_request.labels.*.name, 'build-pr')
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install build dependencies
run: python -m pip install poetry==1.4.2 poetry-dynamic-versioning==1.2.0
- name: Install project
run: poetry install
- name: Build Python package
run: poetry build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
if: contains( github.event.pull_request.labels.*.name, 'publish-pr')
name: Publish package to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pyap2
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/