Skip to content

Commit

Permalink
Bump minor version 😟 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwant authored Jul 28, 2024
1 parent b9a5772 commit e0060e1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 38 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,20 @@ on:
branches:
- main

env:
POETRY_VERSION: "1.5.1"

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}

- name: Build package
run: poetry build

- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
build-package:
uses: ./.github/workflows/workflow-build-package.yml
with:
python_version: "3.x"
poetry_version: "1.5.1"
generate_temp_version: ${{ github.event_name == 'pull_request' && true || false }}

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
# only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
- build-package
runs-on: ubuntu-latest

environment:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ on:
branches:
- main

env:
POETRY_VERSION: "1.5.1"

jobs:
build-package:
uses: ./.github/workflows/workflow-build-package.yml
with:
python_version: "3.x"
poetry_version: "${{ env.POETRY_VERSION }}"
generate_temp_version: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
poetry_version: "1.5.1"
generate_temp_version: ${{ github.event_name == 'pull_request' && true || false }}

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
version: ${{ inputs.poetry_version }}

- name: Generate temp version for the current commit
if: ${{ inputs.generate_temp_version == 'true' }}
if: ${{ inputs.generate_temp_version }}
run: |
CURRENT_VERSION=$(poetry version --short)
NEW_VERSION="${CURRENT_VERSION}.dev${{ github.run_number }}${{ github.run_attempt }}"
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 = "hapless"
version = "0.2.2"
version = "0.3.0"
description = "Run and track processes in background"
authors = ["Misha Behersky <bmwant@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit e0060e1

Please sign in to comment.