File tree Expand file tree Collapse file tree 4 files changed +13
-25
lines changed Expand file tree Collapse file tree 4 files changed +13
-25
lines changed Original file line number Diff line number Diff line change 2222 - name : Build and Publish Package on PyPI
2323 run : make publish
2424 env :
25- PYPI_USER : ${{ secrets.PYPI_USER }}
26- PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
25+ TWINE_USERNAME : ${{ secrets.PYPI_USER }}
26+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ DEV_REQUIREMENTS = $(CURRENT_DIR)/dev_requirements.txt
1111TEST_REPORT_DIR ?= $(CURRENT_DIR ) /tests/report
1212TEST_REPORT_FILE ?= nose2-junit.xml
1313
14- # PyPI credentials
15- PYPI_USER ?=
16- PYPI_PASSWORD ?=
17-
1814# venv targets timestamps
1915VENV_TIMESTAMP = $(VENV ) /.timestamp
2016DEV_REQUIREMENTS_TIMESTAMP = $(VENV ) /.dev-requirements.timestamp
@@ -113,7 +109,7 @@ package: $(DEV_REQUIREMENTS_TIMESTAMP)
113109.PHONY : publish
114110publish : clean-all publish-check setup package
115111 @echo " Upload package version=$( PACKAGE_VERSION) "
116- $(PYTHON ) -m twine upload -u $( PYPI_USER ) -p $( PYPI_PASSWORD ) dist/*
112+ $(PYTHON ) -m twine upload dist/*
117113
118114
119115# Clean targets
Original file line number Diff line number Diff line change @@ -78,22 +78,12 @@ pip install logging-utilities
7878
7979## Release and Publish
8080
81- Only owners are allowed to publish a new version to PyPI. To publish a new version follow the procedure below:
82-
83- 1 . Increase the ` VERSION ` in ` logging_utilities/__init__.py `
84- - Major version for outbreak changes in the user interface (no backward compatibility)
85- - Minor version for new features
86- - Patch version for bug fixes
87- - For alpha version append ` alpha1 ` to ` VERSION `
88- 1 . Commit and push the changes to ` develop ` branch
89- 1 . Merge ` develop ` to ` master `
90- 1 . From ` master ` branch enter
91-
92- ``` shell
93- summon -p gopass --up make publish
94- ```
95-
96- ** NOTE** : this requires to have ` summon` , ` gopass` and the correct ` secrets.yml` file in a parent folder.
81+ New release and publish on PyPI is done automatically upon PR merge into ` master ` branch. For bug fixes and small new features,
82+ PR can be directly open on ` master ` . Then the PR title define the version bump as follow:
83+
84+ - PR title and/or commit message contains ` #major ` => major version is bumped
85+ - PR title and/or commit message contains ` #patch ` or head branch name starts with ` bug-|hotfix-|bugfix- ` => patch version is bumped
86+ - Otherwise by default the minor version is bumped
9787
9888## Contribution
9989
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ phases:
2424 - make ci-check-format
2525 - echo "=== Linting ====================================================="
2626 - make lint
27- build :
28- commands :
2927 - echo "================================================================="
3028 - echo "Setting up dev mode with python version $(python --version)..."
3129 - pip install --upgrade pip
@@ -47,3 +45,7 @@ phases:
4745 - python3.9 -m pip install -e .
4846 - echo "Running nose tests..."
4947 - python3.9 -m nose2 -v -s tests/
48+ build :
49+ commands :
50+ - echo "=== Build package ==============================================="
51+ - make package
You can’t perform that action at this time.
0 commit comments