-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.93 KB
/
python-publish-package.yml
File metadata and controls
58 lines (54 loc) · 1.93 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Publish Python Package
on:
workflow_call:
inputs:
dependency-hash-version:
required: false
type: string
default: "v1"
private-package-repo-url:
description: The url of the private package repository you want to add to poetry. You must also specify `private-package-repo-username`
required: false
type: string
default: ""
extras:
description: Extras to include when installing this package
type: string
required: false
default: NOT_SPECIFIED
working-directory:
description: The working directory where this action should run. Defaults to the root of the git repository.
type: string
required: false
default: "."
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
secrets:
private-package-repo-username:
required: false
private-package-repo-push-token:
required: false
jobs:
publish:
name: Publish Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python and Poetry and Install Dependencies
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
with:
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
dependency-hash-version: ${{ inputs.dependency-hash-version }}
exclude-dev-dependencies: true
extras: ${{ inputs.extras }}
- name: Build and Publish
uses: triaxtec/github-actions/python/publish-package@v3
with:
private-package-repo-url: ${{ inputs.private-package-repo-url }}
token: ${{ secrets.private-package-repo-push-token }}
dir: ${{ inputs.working-directory }}