Skip to content

Commit c000202

Browse files
authored
Merge pull request #18 from TomMonks/dev
PATCH: pypi workflow update
2 parents bfd7afe + 6d054be commit c000202

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

.github/workflows/python-publish.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# 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
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.
38

49
name: Upload Python Package
510

611
on:
712
release:
8-
types: [created]
13+
types: [published]
14+
15+
permissions:
16+
contents: read
917

1018
jobs:
1119
deploy:
@@ -21,11 +29,12 @@ jobs:
2129
- name: Install dependencies
2230
run: |
2331
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
32+
pip install build
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package
36+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_TOKEN }}
40+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# patch ed - build error due to imporing numpy into __init__
44
# from sim_tools import __version__
5-
VERSION = "0.3.0"
5+
VERSION = "0.3.1"
66

77

88
# Read in the requirements.txt file

sim_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.3.0'
1+
__version__ = '0.3.1'
22
__author__ = 'Thomas Monks'
33

44
from . import datasets, distributions, time_dependent, ovs

0 commit comments

Comments
 (0)