Skip to content

Commit 584cfc8

Browse files
authored
Merge pull request #240 from consideRatio/master
ci: tweaks to align with modern practices and jupyterhub org in general
2 parents 2fc14bf + 0923197 commit 584cfc8

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflows will upload a Python Package using Twine when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
3+
#
44
name: Upload Python Package
55

66
on:
@@ -13,18 +13,26 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Set up Python
17-
uses: actions/setup-python@v3
16+
- uses: actions/setup-python@v3
1817
with:
1918
python-version: "3.x"
20-
- name: Install dependencies
19+
20+
- name: install build package
2121
run: |
22-
python -m pip install --upgrade pip
23-
pip install setuptools wheel twine
24-
- name: Build and publish
22+
pip install --upgrade pip
23+
pip install build
24+
pip freeze
25+
26+
- name: build release
27+
run: |
28+
python -m build --sdist --wheel .
29+
ls -l dist
30+
sha256sum dist/* | tee SHA256SUMS
31+
32+
- name: Publish to PyPI
2533
env:
26-
TWINE_USERNAME: "__token__"
34+
TWINE_USERNAME: __token__
2735
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
2836
run: |
29-
python setup.py sdist bdist_wheel
30-
twine upload dist/*
37+
pip install twine
38+
twine upload --skip-existing dist/*

.github/workflows/test.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@ name: Test
55

66
on:
77
pull_request:
8+
paths-ignore:
9+
- "**.md"
10+
- "**.yml"
11+
- "**.yaml"
12+
- "!.github/workflows/test.yml"
813
push:
14+
paths-ignore:
15+
- "**.md"
16+
- "**.yml"
17+
- "**.yaml"
18+
- "!.github/workflows/test.yml"
19+
branches-ignore:
20+
- "dependabot/**"
21+
- "pre-commit-ci-update-config"
22+
tags: ["**"]
923
workflow_dispatch:
1024

1125
jobs:
12-
pre-commit:
13-
name: Run pre-commit
14-
runs-on: ubuntu-20.04
15-
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v3
18-
- uses: pre-commit/[email protected]
19-
2026
pytest:
2127
name: "Run pytest"
2228
runs-on: ubuntu-20.04
@@ -53,7 +59,7 @@ jobs:
5359
- name: Set up Python ${{ matrix.python-version }}
5460
uses: actions/setup-python@v3
5561
with:
56-
python-version: ${{ matrix.python-version }}
62+
python-version: "${{ matrix.python-version }}"
5763

5864
- name: Install dependencies
5965
run: |

0 commit comments

Comments
 (0)