-
-
Notifications
You must be signed in to change notification settings - Fork 88
60 lines (48 loc) · 1.84 KB
/
python-publish.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
50
51
52
53
54
55
56
57
58
59
60
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload PyHTools Python Package to PyPi
on:
release:
types: [published]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Repo Checkout
uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.12.x"
# - name: Install and configure Poetry
# uses: snok/[email protected]
# with:
# # version: 1.5.1
# # virtualenvs-create: true
# virtualenvs-in-project: true
# # virtualenvs-path: ~/poetry-venv
# # installer-parallel: true
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v3
# with:
# path: .venv
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: |
# python -m pip install --upgrade pip
# poetry install --sync --no-interaction
# - name: Build package
# run: poetry build
# - name: Publish package
# uses: pypa/[email protected]
# with:
# packages-dir: ./dist