Skip to content

Commit

Permalink
Bump the version on release.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonsaurus committed Jul 5, 2021
1 parent 58bfac8 commit 197d6dc
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,58 @@ on:
types: [ published ]

jobs:
bump-pyproject-version:
name: Bump pyproject version
runs-on: ubuntu-latest

steps:
- name: Checkout the repo
uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: "3.9"

- name: Install Poetry
run: pip install poetry

- name: Bump the version
run: poetry version ${{ github.event.release.tag_name }}

- name: Commit the changes
run: |
git add pyproject.toml
git commit -m "Bump version to ${{ github.event.release.tag_name }}"
git push origin main
publish-to-pipy:
name: publish to pypi.org
name: Publish to pypi.org
runs-on: ubuntu-latest
needs: bump-pyproject-version

steps:
- name: Checkout the repo and the submodules.
- name: Checkout the repo.
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.9"

- name: Install Poetry >= 1.2.0a
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py -O &&
python install-poetry.py --preview
- name: Install poetry
run: pip install poetry

- name: Install dependencies
run: poetry install

- name: Install poetry-version-plugin
run: poetry plugin add poetry-version-plugin

- name: Build and publish to pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} &&
poetry publish --build
build-and-push-on-release:
name: Build and push
name: Build and push to DockerHub
runs-on: ubuntu-latest
needs: publish-to-pipy

Expand Down

0 comments on commit 197d6dc

Please sign in to comment.