Skip to content

Commit 6b5937d

Browse files
authored
Merge pull request #56 from BioSystemsUM/workflows
Workflows
2 parents 6457b4c + 1dfdb1d commit 6b5937d

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
name: Create Release
11+
permissions: write-all
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Get version from setup.cfg
17+
id: get-version
18+
run: echo "::set-output name=version::$(awk -F "=" '/^version/ {print $2}' setup.cfg | tr -d '[:space:]')"
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
24+
with:
25+
tag_name: v${{ steps.get-version.outputs.version }}
26+
release_name: Release v${{ steps.get-version.outputs.version }}
27+
draft: false
28+
# prerelease: ${{ contains(github.ref, '-beta') || contains(github.ref, '-alpha') || contains(github.ref, '-rc') }}
29+
prerelease: false

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish to PyPI.org
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch: # Add this to allow manual triggering
6+
jobs:
7+
pypi:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- run: python3 -m pip install --upgrade build && python3 -m build
17+
- name: Publish package
18+
uses: pypa/gh-action-pypi-publish@release/v1
19+
with:
20+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = reactea
3-
version = 0.1.1-beta
3+
version = 1.0.0
44
description = ReactEA: Combining Evolutionary Algorithms with Reaction Rules Towards Focused Molecular Design
55
long_description = file: README.md
66
long_description_content_type = text/markdown
@@ -12,7 +12,7 @@ license = GPL-3.0 license
1212
license_file = LICENSE
1313
platforms = unix, linux, osx, cygwin, win32
1414
classifiers =
15-
Development Status :: 4 - Beta
15+
Development Status :: 5 - Production/Stable
1616
License :: OSI Approved :: MIT License
1717
Programming Language :: Python :: 3.7
1818
Programming Language :: Python :: 3.8

src/reactea/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from reactea.optimization.jmetal.ea import ChemicalEA
1010
from reactea.wrappers import case_study_wrapper, evaluation_functions_wrapper
1111

12+
__version__ = '1.0.0'
13+
1214

1315
def run_reactea(configs_path: Union[str, dict],
1416
case_study: CaseStudy,

0 commit comments

Comments
 (0)