Skip to content

Commit

Permalink
Merge pull request #18 from benzaita/fix-dist
Browse files Browse the repository at this point in the history
Fix dist
  • Loading branch information
benzaita authored Feb 27, 2024
2 parents 8c0c400 + ef8d7a6 commit 9b5c947
Show file tree
Hide file tree
Showing 23 changed files with 189 additions and 641 deletions.
8 changes: 0 additions & 8 deletions .bumpversion.cfg

This file was deleted.

6 changes: 6 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
}
}
36 changes: 16 additions & 20 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,56 +12,52 @@ jobs:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv sync --dev
pipx install poetry
make setup
- name: Test
run: |
pipenv run invoke test
make test
dist:
needs: [build]
if: startsWith(github.ref, 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv sync --dev
pipx install poetry
make setup
- name: Prepare distribution
run: |
pipenv run invoke dist
make dist
- name: Publish (test PyPi)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.test_pypi_apikey }}
POETRY_HTTP_BASIC_FOO_USERNAME: __token__
POETRY_HTTP_BASIC_FOO_PASSWORD: ${{ secrets.test_pypi_apikey }}
run: |
pip install twine
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
make publish.testpypi
- name: Install (test PyPi)
run: |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple dockerized
dockerized version
- name: Publish (PyPi)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_apikey }}
POETRY_HTTP_BASIC_FOO_USERNAME: __token__
POETRY_HTTP_BASIC_FOO_PASSWORD: ${{ secrets.pypi_apikey }}
run: |
pip install twine
python -m twine upload dist/*
make publish
- name: Install (PyPi)
run: |
pip install dockerized
Expand Down
6 changes: 0 additions & 6 deletions .idea/$CACHE_FILE$

This file was deleted.

19 changes: 0 additions & 19 deletions .idea/$PRODUCT_WORKSPACE_FILE$

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
default:
:

.PHONY: setup
setup:
pipenv sync --dev
poetry install --no-root

.PHONY: test
test:
pipenv run invoke test
poetry run python -m unittest -v

.PHONY: dist
dist:
pipenv run invoke dist
poetry build

.PHONY: publish.testpypi
publish.testpypi:
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish --repository testpypi

.PHONY: publish
publish:
poetry publish

bumpversion.major:
pipenv run invoke bumpversion major
poetry version major
echo "VERSION = '$$(poetry version -s)'" > dockerized/version.py

bumpversion.minor:
pipenv run invoke bumpversion minor
poetry version minor
echo "VERSION = '$$(poetry version -s)'" > dockerized/version.py

bumpversion.patch:
pipenv run invoke bumpversion patch
poetry version patch
echo "VERSION = '$$(poetry version -s)'" > dockerized/version.py
18 changes: 0 additions & 18 deletions Pipfile

This file was deleted.

Loading

0 comments on commit 9b5c947

Please sign in to comment.