-
Notifications
You must be signed in to change notification settings - Fork 10
37 lines (28 loc) · 927 Bytes
/
ci_package.yml
File metadata and controls
37 lines (28 loc) · 927 Bytes
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
name: "(Reusable) Build & Deploy Package"
on:
workflow_call:
inputs:
twine-version:
description: "Twine version to use."
type: "string"
required: false
default: "5.1.1"
jobs:
package:
name: "Build & Deploy Package"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.7"
- 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.9.0"