Skip to content

Commit

Permalink
Merge pull request #136 from Leengit/pypi_publish
Browse files Browse the repository at this point in the history
COMP: Update GitHub actions for publishing to PyPI

Also, add publishing to Test PyPI.
Also, add `.github/dependabot.yml`
  • Loading branch information
Leengit authored Sep 18, 2024
2 parents 19f0f29 + 8f06c27 commit fb332e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
13 changes: 10 additions & 3 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
df -h
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Set up Python "3.9"
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install pypa/build
Expand All @@ -75,8 +75,15 @@ jobs:
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish to Test PyPI
if: github.event.repository.fork == false
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit fb332e5

Please sign in to comment.