Skip to content

Merge pull request #57 from GSA/get-source-by-jobid #17

Merge pull request #57 from GSA/get-source-by-jobid

Merge pull request #57 from GSA/get-source-by-jobid #17

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version_no:
description: 'Release Version:'
required: true
env:
POETRY_VERSION: "1.7.1"
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/datagov-harvesting-logic/
steps:
- name: checkout
uses: actions/checkout@v4
- name: Update setup.py if manual release
if: github.event_name == 'workflow_dispatch'
run: |
sed -i "s/version='[0-9]\{1,2\}.[0-9]\{1,4\}.[0-9]\{1,4\}',/version='${{github.event.inputs.version_no}}',/g" pyproject.toml
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Create packages
run: |
poetry build --verbose
- name: pypi-publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}