Skip to content

Commit

Permalink
Adds automatic release workflow (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trybnetic authored Nov 23, 2022
1 parent 9e51f0d commit 5e98c81
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and upload releases

on:
release:
types: [published]

jobs:
deploy:
name: ${{ matrix.os }} ${{ matrix.python-version }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: ['3.8', '3.9', '3.10']
poetry-version: [1.2]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install package
run: poetry install
- name: Build and publish package
run: poetry publish --build --skip-existing --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
20 changes: 3 additions & 17 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,10 @@ Release Process
3. Create a new release on Github of the `main` branch of the form ``vX.Y.Z``
(where ``X``, ``Y``, and ``Z`` refer to the new version). Add a description
of the new feature or bugfix. For details on the version number see
Versioning_ below.
Versioning_ below. This will trigger a Action to automatically build and
upload the release to PyPI

4. Pull the repository and checkout the tag and create the distribution files
using:

.. code:: bash
git pull
git checkout vX.Y.Z
poetry build
5. (maintainers only) Publish the builds to PyPI.

.. code:: bash
poetry publish
7. (maintainers only) Check if the new version is on pypi (https://pypi.python.org/pypi/pyndl/).
4. Check if the new version is on pypi (https://pypi.python.org/pypi/pyndl/).


Versioning
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyndl"
version = "1.0.0"
version = "1.0.1"
description = "Naive discriminative learning implements learning and classification models based on the Rescorla-Wagner equations."

license = "MIT"
Expand Down

0 comments on commit 5e98c81

Please sign in to comment.