-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
29 lines (29 loc) · 976 Bytes
/
action.yaml
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
name: 'Publish to PyPI'
description: 'Publish an python package using the setuptools build system'
inputs:
working-directory:
description: "Path within the repo to the folder where the myproject.toml file lives"
required: false
default: "."
runs:
using: "composite"
steps:
- name: Install Python package dependencies
run: |
python -m pip install -U pip setuptools wheel twine build
pip install -e .
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Build dist
run: python -m build
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Check dist
run: twine check dist/*
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ${{ inputs.working-directory }}/dist/
skip-existing: true