Skip to content

Publish pgscatalog.match #4

Publish pgscatalog.match

Publish pgscatalog.match #4

Workflow file for this run

name: Publish pgscatalog.match
on:
workflow_dispatch:
inputs:
package-directory:
type: choice
options:
- pgscatalog.match
python-version:
required: false
type: choice
options:
- "3.11"
jobs:
publish:
name: build and publish match package
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v3.0.0
- name: Build package
run: poetry build --no-interaction
working-directory: ${{inputs.package-directory}}
- name: Publish package distributions
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ${{inputs.package-directory}}/dist
skip-existing: false
- name: Read package version
run: |
echo "TAG_NAME=$(poetry version | tr -s ' ' '-')" >> $GITHUB_ENV
working-directory: ${{inputs.package-directory}}
- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ env.TAG_NAME }}',
sha: context.sha
})