Skip to content

Commit

Permalink
Merge pull request #142 from marksie1988/fix_release_workflow_2
Browse files Browse the repository at this point in the history
ci: resolve problems with release
  • Loading branch information
marksie1988 authored Apr 15, 2023
2 parents dc6028a + af53492 commit dff0ab5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry nox
- name: Publish distribution 📦 to PyPI
run: |
pip install poetry nox
nox -s release
nox -rs release -- "$PYPI_PASSWORD"
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
11 changes: 2 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,10 @@ def test_style(session: Session) -> None:
@nox.session(reuse_venv=True)
def release(session: Session) -> None:
"""Release a new version of the package"""
pypi_password = session.posargs[0]
session.run("poetry", "install", external=True)
session.run("poetry", "build", external=True)
session.run(
"poetry",
"publish",
"-u",
"__token__",
"-p",
session.env["PYPI_PASSWORD"],
external=True,
)
session.run("poetry", "publish", "-u", "__token__", "-p", pypi_password)


@nox.session(reuse_venv=True)
Expand Down

0 comments on commit dff0ab5

Please sign in to comment.