Skip to content

Commit 3037e69

Browse files
committed
add pypi publish workflow
1 parent 03cbadf commit 3037e69

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: publish-release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
buildAndPublish:
10+
name: Publish to PyPi
11+
permissions:
12+
id-token: write
13+
environment: production
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.8"
21+
22+
- name: build
23+
run: |
24+
python -m pip install --upgrade build
25+
python -m build
26+
- name: publish
27+
if: github.event_name == 'release'
28+
uses: pypa/gh-action-pypi-publish@release/v1

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3-
from setuptools import setup, find_packages
4-
from pip._internal.req import parse_requirements as parse
3+
import pathlib
54
from urllib.parse import urlparse
5+
from pip._internal.req import parse_requirements as parse
6+
from setuptools import find_packages, setup
67

78

89
def _format_requirement(req):
@@ -32,14 +33,17 @@ def parse_requirements(fname):
3233
setup(
3334
name="sumo-wrapper-python",
3435
description="Python wrapper for the Sumo API",
36+
long_description=pathlib.Path("README.md").read_text(),
37+
long_description_content_type="text/markdown",
3538
license="Apache 2.0",
3639
url="https://github.com/equinor/sumo-wrapper-python",
3740
keywords="sumo, python",
3841
classifiers=[
3942
"Development Status :: 3 - Alpha",
4043
"Intended Audience :: Developers",
4144
"Natural Language :: English",
42-
"Programming Language :: Python :: 3.7" "Programming Language :: Python :: 3.8",
45+
"Programming Language :: Python :: 3.7"
46+
"Programming Language :: Python :: 3.8",
4347
],
4448
use_scm_version={"write_to": "src/sumo/wrapper/version.py"},
4549
author="Equinor ASA",

0 commit comments

Comments
 (0)