-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.03 KB
/
ci_package.yml
File metadata and controls
39 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "(Reusable) Build & Deploy Package"
on:
workflow_call:
inputs:
twine-version:
description: "Twine version to use."
type: "string"
required: false
default: "6.0.1"
jobs:
package:
name: "Build & Deploy Package"
runs-on: "ubuntu-24.04"
steps:
- uses: "actions/checkout@v4.2.2"
- id: "python_and_poetry"
uses: "./.github/actions/install_python_and_poetry"
with:
python-version-file: ".python-version"
- name: "Build package"
run: "poetry build"
- name: "Install twine"
run: "pipx install --python='${{ steps.python_and_poetry.outputs.python-path }}' twine==${{ inputs.twine-version }}"
- name: "Check package"
run: "twine check dist/*"
- name: "Publish package"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
uses: "pypa/gh-action-pypi-publish@v1.12.3"
with:
attestations: false # Disable attestations until publishing to PyPI from reusable workflow will be fixed