Skip to content

Commit

Permalink
Merge branch 'template'
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Dec 4, 2023
2 parents 0e1f2af + b251cc0 commit 1ec7a22
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
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-offline/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-offline
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

0 comments on commit 1ec7a22

Please sign in to comment.