Skip to content

Commit

Permalink
Render template ../cookiecutter-python-cli at eeb5c912be
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Dec 4, 2023
1 parent 857fe6c commit 3c656c5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"_dest_dir": "worktree",
"_template": "../cookiecutter-python-cli",
"author_email": "[email protected]",
"author_github": "liskin",
"author_name": "Tom\u00e1\u0161 Janou\u0161ek",
"author_paypal": "lisknisi",
"dest_dir": "worktree",
"hyphenated": "strava-gear",
"name": "strava-gear",
"underscored": "strava_gear"
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,27 @@ jobs:
- name: Install dependencies
run: make venv
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: flake8
run: make lint-flake8
- name: mypy
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: mypy
run: make lint-mypy
- name: isort
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: isort
run: make lint-isort
- name: pytest
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: pytest
run: make test-pytest
- name: cram, readme
run: make readme
run: make test-cram readme
- name: check-wheel
run: make check-wheel

Expand Down Expand Up @@ -121,22 +121,22 @@ jobs:
- name: Install remaining dependencies
run: make venv-system-site-packages
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: flake8
run: make lint-flake8
- name: mypy
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: mypy
run: make lint-mypy
- name: isort
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: isort
run: make lint-isort
- name: pytest
uses: liskin/gh-problem-matcher-wrap@v2
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: pytest
run: make test-pytest
Expand Down
40 changes: 33 additions & 7 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: Upload Python Package to PyPI
name: Build and publish Python distribution 📦 to PyPI

# XXX: before publishing, configure PyPI
# - https://pypi.org/manage/account/publishing/ (new packages)
# - https://pypi.org/manage/project/strava-gear/settings/publishing/ (existing packages)

on:
release:
types: [created]

jobs:
pypi:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,9 +23,30 @@ jobs:
- name: Install dependencies
run: |
make venv
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build
run: |
make twine-upload
make dist
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

pypi:
needs:
- build
name: Publish distribution 📦 to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/strava-gear
permissions:
id-token: write
steps:
- name: Fetch artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dev = [
"flake8",
"isort >= 5.0",
"mypy >= 0.900",
"pyflakes >= 2.2.0",
"twine",
"types-PyYAML",
]
Expand Down

0 comments on commit 3c656c5

Please sign in to comment.