-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
49 lines (44 loc) · 1.44 KB
/
action.yml
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
40
41
42
43
44
45
46
47
48
49
name: 'Build Python package'
description: 'Build a Python package and store the results'
inputs:
artifact-name:
default: "artifact"
artifact-path:
default: "dist"
skip-checkout:
description: "Set to 'yes' to avoid checking out the repository. Default 'no'."
default: "no"
pin-dependencies:
description: "Set to 'yes' to pin 'poetry.lock' dependencies. Default 'no'."
default: "no"
runs:
using: 'composite'
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: inputs.skip-checkout != 'yes'
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.x'
- name: Install poetry and add plugins
run: |
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.5.1 python3 -
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
poetry self add poeblix
shell: bash
- name: Build distributions.
run: |
if [ ${{ inputs.pin-dependencies }} == 'yes' ]
then
poetry blixbuild --only-lock
poetry build -f sdist
else
poetry build
fi
shell: bash
- name: Upload distribution artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.artifact-path }}