Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ master, main ]
branches: [ main ]
pull_request:
branches: [ master, main ]
branches: [ main ]

jobs:
test:
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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/')

4 changes: 2 additions & 2 deletions .github/workflows/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test Matrix

on:
push:
branches: [ master, main ]
branches: [ main ]
pull_request:
branches: [ master, main ]
branches: [ main ]

jobs:
test-matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ master, main ]
branches: [ main ]
pull_request:
branches: [ master, main ]
branches: [ main ]

jobs:
lint:
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -107,4 +107,4 @@ ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "ioc.extra.*"
ignore_errors = true
ignore_errors = true