Skip to content

Commit

Permalink
Update publishing workflow (#57)
Browse files Browse the repository at this point in the history
* Update publishing workflow
* Dependencies in requirements.txt instead of .in
  • Loading branch information
danirus authored Jan 30, 2024
1 parent c993329 commit 36b0b83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
syntax-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Python setup
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install test dependencies
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ jobs:
publish:
if: github.event_name == 'release'
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Python setup
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build, wheel and twine
run: pip install build wheel twine
python-version: '3.12'

- name: Install 'build' and 'wheel'
run: pip install build wheel

- name: Build source tarball and binary
run: python -m build --sdist --wheel --outdir dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1.8
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


requirements = []
with open(BASE_DIR / "requirements.in", "r") as req_file:
with open(BASE_DIR / "requirements.txt", "r") as req_file:
for item in req_file:
requirements.append(item)

Expand Down

0 comments on commit 36b0b83

Please sign in to comment.