Merge pull request #3 from KAUTH/add-python-datamodels #1
Workflow file for this run
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
# This workflow will upload a Python Package to TestPyPI. | |
name: Publish to TestPyPI | |
on: | |
push: | |
branches: | |
- 'test-python-release/**' | |
# To be used as a reusable workflows | |
workflow_call: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine | |
- name: Build package | |
# Could also use: poetry build | |
run: | | |
cd datamodels/python | |
python -m build | |
- name: Check distribution's long description rendering on PyPI | |
run: twine check dist/* | |
- name: Publish package to TestPyPI | |
if: github.repository == 'KAUTH/govgr-opendata-api-schema' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
verbose: true |