Skip to content

Commit

Permalink
Bump version: 0.1.0 → 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Burbulla committed Apr 12, 2024
1 parent cd794e1 commit 918d611
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.1.0"
current_version = "0.1.1"

[[tool.bumpversion.files]]
filename = "pyproject.toml"
20 changes: 15 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Documentation

on:
push:
branches: [main]
branches: [main, feature/release-pipeline]
release:
types: [published]

permissions:
contents: write
Expand All @@ -19,9 +21,6 @@ jobs:
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -30,4 +29,15 @@ jobs:
- name: Install
run: |
pip install ".[dev]"
- run: mkdocs gh-deploy --force
- name: Get Current Version
if: ${{ github.event_name == 'release' }}
run: |
export CURRENT_VERSION=$(bump-my-version show current_version)
echo CURRENT_VERSION=$CURRENT_VERSION >> $GITHUB_ENV
shell: bash
- name: Publish release
if: ${{ github.event_name == 'release' }}
run: mike deploy ${{ env.CURRENT_VERSION }} --push --force
- name: Publish latest
if: ${{ github.event_name == 'push' }}
run: mike deploy latest --push --force
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish package

on:
push:
branches: [feature/release-pipeline]
release:
types: [published]

workflow_dispatch:
inputs:
version:
description: "Version to publish"
required: false
default: "0.0.0"

jobs:
publish:
runs-on: ubuntu-latest
concurrency:
group: publish
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: "true"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: "pip"
- name: Install
run: |
pip install ".[dev]"
- name: Get Current Version
run: |
export CURRENT_VERSION=$(bump-my-version show current_version)
echo CURRENT_VERSION=$CURRENT_VERSION >> $GITHUB_ENV
shell: bash
- name: Build and publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload --verbose --non-interactive --repository testpypi dist/*
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ This applies a simple CSS-filter to the output image of the cell.
## Release process

In order to create a new release, make sure that the project's venv is active
and the repository is on the main branch (including no untracked files).
and the repository is clean and on the main branch.

Create a new release using the script `build_scripts/release.sh`.
This script will create a release tag on the repository and bump
the version number:

```shell
./build_scripts/release.sh 0.1.0
./build_scripts/release.sh
```

Afterwards, create a GitHub release for that tag. That will a trigger a CI
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords = [
"Artificial Intelligence", "Machine Learning", "Mathematics", "Physics",
"Operator Learning", "Physics-Informed ML", "Neural Operator", "DeepONet",
]
version = "0.1.0"
version = "0.1.1"
dependencies = [
"black", # code formatting
"flake8", # code analysis
Expand Down

0 comments on commit 918d611

Please sign in to comment.