Skip to content

Commit

Permalink
Update GH actions (#52)
Browse files Browse the repository at this point in the history
* Update GH actions

* Fully align test and deploy

* Still had vermouth mentioned in the deploy...

* Url thingies

* Align test and deploy again
  • Loading branch information
pckroon authored Jan 28, 2025
1 parent f34cbfd commit 5bf8745
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 29 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
py_version: ["3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version }}
- name: Install dependencies
Expand All @@ -40,32 +40,36 @@ jobs:
deploy:
needs: [build]
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/pysmiles
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

python-version: '3.11'
cache: pip
cache-dependency-path: |
**/setup.cfg
**/requirements-*.txt
**/pyproject.toml
- name: Install dependencies
run: |
pip install --upgrade setuptools pip
pip install --upgrade .
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
pip install pbr
run: |
python3 -m pip install build pbr --user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish package to PyPI
run: python3 -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
46 changes: 42 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
py_version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version }}
- name: Install dependencies
Expand All @@ -44,9 +44,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
Expand All @@ -57,3 +57,41 @@ jobs:
- name: Run pylint
run: |
pylint --disable=fixme --fail-under=8.0 pysmiles tests
deploy:
needs: [build, lint]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pysmiles
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: |
**/setup.cfg
**/requirements-*.txt
**/pyproject.toml
- name: Install dependencies
run: |
pip install --upgrade setuptools pip
pip install --upgrade .
- name: Install pypa/build
run: |
python3 -m pip install build pbr --user
- name: Build a binary wheel and a source tarball
run: python3 -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}

0 comments on commit 5bf8745

Please sign in to comment.