Skip to content

Commit

Permalink
tasks: update release task
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw committed Feb 8, 2023
1 parent b255271 commit 47f0259
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
43 changes: 17 additions & 26 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,6 @@ def test_integration(context, focus=None, debug=False):
run_invoke_cmd(context, command)


# Support generation of Poetry managed setup.py file #761
# https://github.com/python-poetry/poetry/issues/761#issuecomment-689491920
@task
def install_local(context):
run_invoke_cmd(
context,
"""
rm -rf dist/ && poetry build
""",
)
run_invoke_cmd(
context,
"""
tar -xvf dist/*.tar.gz '*/setup.py'
""",
)
run_invoke_cmd(
context,
"""
pip install -e .
""",
)


@task
def lint_black_diff(context):
command = """
Expand Down Expand Up @@ -205,13 +181,28 @@ def check(_):


@task
def release(context, password):
def release(context, username=None, password=None):
user_password = f"-u{username} -p{password}" if username is not None else ""
command = f"""
poetry publish --build -u stanislaw -p {password}
rm -rfv dist/ &&
python3 -m build &&
twine check dist/* &&
twine upload dist/reqif-*.tar.gz
{user_password}
"""
run_invoke_cmd(context, command)


@task
def release_local(context):
run_invoke_cmd(
context,
"""
rm -rfv dist/ && pip install -e .
""",
)


# https://github.com/github-changelog-generator/github-changelog-generator
# gem install github_changelog_generator
@task
Expand Down

0 comments on commit 47f0259

Please sign in to comment.