Skip to content

Commit 47a1cfc

Browse files
committed
Add python-release workflow
1 parent d45fdd2 commit 47a1cfc

File tree

5 files changed

+42
-6
lines changed

5 files changed

+42
-6
lines changed

.bumpversion.cfg

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[bumpversion]
2+
commit = True
3+
tag = True
4+
current_version = 0.0.2
5+
6+
[bumpversion:file:setup.py]
7+
search = version="{current_version}"
8+
replace = version="{new_version}"

.github/workflows/ci.yml .github/workflows/test-release.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
name: CI
1+
name: Test and release
22

33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
6+
test:
87
runs-on: ubuntu-latest
9-
108
steps:
11-
129
- uses: actions/checkout@v2
1310

1411
- name: Set up Python 3.9
@@ -28,3 +25,9 @@ jobs:
2825
- name: Pytest
2926
run: |
3027
pytest -s --cov=predict_pv_yield
28+
29+
release:
30+
needs: test
31+
uses: openclimatefix/.github/.github/workflows/python-release.yml@main
32+
secrets:
33+
token: ${{ secrets.token }}

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include *.txt

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# PVNet
2-
[![CI](https://github.com/openclimatefix/PVNet/actions/workflows/ci.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/ci.yml)
2+
[![Test and release](https://github.com/openclimatefix/PVNet/actions/workflows/test-release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/test-release.yml)
33

44
## Setup
55
```bash

setup.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
""" Usual setup file for package """
2+
# read the contents of your README file
3+
from pathlib import Path
4+
5+
from setuptools import find_packages, setup
6+
7+
this_directory = Path(__file__).parent
8+
long_description = (this_directory / "README.md").read_text()
9+
install_requires = (this_directory / "requirements.txt").read_text().splitlines()
10+
11+
setup(
12+
name="PVNet",
13+
version="0.0.2",
14+
license="MIT",
15+
description="PVNet",
16+
author="Peter Dudfield",
17+
author_email="[email protected]",
18+
company="Open Climate Fix Ltd",
19+
install_requires=install_requires,
20+
long_description=long_description,
21+
long_description_content_type="text/markdown",
22+
include_package_data=True,
23+
packages=find_packages(),
24+
)

0 commit comments

Comments
 (0)