Skip to content

Commit f5d1e86

Browse files
authored
Merge pull request #83 from Pyhass/fix-python-publishing
Fix python publishing
2 parents b039a9d + f47a70b commit f5d1e86

File tree

4 files changed

+62
-53
lines changed

4 files changed

+62
-53
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
14-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
14+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1515

1616
steps:
1717
- uses: actions/checkout@v2

.github/workflows/python-publish.yml

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,70 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#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+
19
name: Upload Python Package
210

311
on:
412
release:
513
types: [published]
614

15+
permissions:
16+
contents: read
17+
718
jobs:
8-
deploy:
9-
runs-on: ubuntu-20.04
19+
release-build:
20+
runs-on: ubuntu-latest
1021

1122
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v2
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
1526
with:
1627
python-version: "3.x"
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install setuptools wheel twine unasync
21-
- name: Build and publish
22-
env:
23-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
24-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28+
29+
- name: Build release distributions
2530
run: |
26-
python setup.py sdist bdist_wheel
27-
twine upload dist/*
31+
# NOTE: put your own distribution build steps here.
32+
python -m pip install build
33+
python -m build
34+
35+
- name: Upload distributions
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
pypi-publish:
42+
runs-on: ubuntu-latest
43+
needs:
44+
- release-build
45+
permissions:
46+
# IMPORTANT: this permission is mandatory for trusted publishing
47+
id-token: write
48+
49+
# Dedicated environments with protections for publishing are strongly recommended.
50+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
51+
environment:
52+
name: pypi
53+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54+
# url: https://pypi.org/p/YOURPROJECT
55+
#
56+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57+
# ALTERNATIVE: exactly, uncomment the following line instead:
58+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59+
60+
steps:
61+
- name: Retrieve release distributions
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: release-dists
65+
path: dist/
66+
67+
- name: Publish release distributions to PyPI
68+
uses: pypa/gh-action-pypi-publish@release/v1
69+
with:
70+
packages-dir: dist/

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
2-
name = pyhiveapi
2+
name = pyhive-integration
33
description = A Python library to interface with the Hive API
44
keywords = Hive API Library
55
license = MIT
6-
author = Rendili
7-
author_email = rendili@outlook.com
6+
author = KJonline24
7+
author_email = khole_47@icloud.com
88
url = https://github.com/Pyhive/pyhiveapi
99
project_urls =
1010
Source = https://github.com/Pyhive/Pyhiveapi

0 commit comments

Comments
 (0)