diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c79f5a1..4d7829c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master, main ] + branches: [ main ] pull_request: - branches: [ master, main ] + branches: [ main ] jobs: test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a10ff9..c6b963a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,11 @@ -name: Release +name: Test Package on: push: - tags: - - 'v*' - - '[0-9]+.[0-9]+.[0-9]+' + branches: [ main ] + pull_request: + branches: [ main ] + jobs: test: @@ -34,20 +35,4 @@ jobs: - name: Check package run: | twine check dist/* - - - name: Publish to Test PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} - run: | - twine upload --repository testpypi dist/* - if: env.TWINE_PASSWORD != '' - continue-on-error: true - - - name: Publish to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - twine upload dist/* - if: env.TWINE_PASSWORD != '' && startsWith(github.ref, 'refs/tags/') \ No newline at end of file + \ No newline at end of file diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index e2375f7..cb8c890 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -2,9 +2,9 @@ name: Test Matrix on: push: - branches: [ master, main ] + branches: [ main ] pull_request: - branches: [ master, main ] + branches: [ main ] jobs: test-matrix: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 295fa97..b46de26 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,9 @@ name: Tests on: push: - branches: [ master, main ] + branches: [ main ] pull_request: - branches: [ master, main ] + branches: [ main ] jobs: lint: diff --git a/Makefile b/Makefile index ca14704..38c33b5 100755 --- a/Makefile +++ b/Makefile @@ -1,11 +1,18 @@ all: build upload build: + pip install build twine python -m build + twine check dist/* -upload: +upload-prod: build + export TWINE_USERNAME=__token__ python -m twine upload dist/* +upload-test: build + export TWINE_USERNAME=__token__ + python -m twine --repository testpypi upload dist/* + clean: rm -rf build/ dist/ *.egg-info/ __pycache__/ .pytest_cache/ .mypy_cache/ find . -type f -name "*.pyc" -delete diff --git a/pyproject.toml b/pyproject.toml index 9f3acee..6399833 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ioc" -version = "0.0.16" +version = "0.1.0" description = "A small dependency injection container based on Symfony2 Dependency Component" readme = "README.md" license = "Apache-2.0" @@ -107,4 +107,4 @@ ignore_missing_imports = true [[tool.mypy.overrides]] module = "ioc.extra.*" -ignore_errors = true \ No newline at end of file +ignore_errors = true