Skip to content

Commit ae4690f

Browse files
Create python-publish.yml
1 parent 722565e commit ae4690f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
env:
16+
HLPY_BUSINESS_RULE_ENGINE_VERSION: ${{ github.ref_name }}
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
deploy:
23+
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Set up Python
29+
uses: actions/setup-python@v3
30+
with:
31+
python-version: '3.x'
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install -r requirements.txt
36+
- name: Build package
37+
run: python -m build
38+
- name: Publish package
39+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)