File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : pip-install-test
1+ name : pip-install
22
33on :
44 pull_request :
55 branches : [ main ]
66 workflow_dispatch :
7-
7+
88
99jobs :
1010 build :
3131# - name: Load cached poetry environment
3232# id: cached-poetry-dependencies
3333# uses: actions/cache@v2
34- # with:
34+ # with:
3535# path: .venv
3636# key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
3737# - name: Install dependencies
Original file line number Diff line number Diff line change 1- name : lint
1+ name : pylint
22
3- on :
3+ on :
44 pull_request :
55 branches : [ main ]
66 workflow_dispatch :
2727 - name : Load cached poetry environment
2828 id : cached-poetry-dependencies
2929 uses : actions/cache@v2
30- with :
30+ with :
3131 path : .venv
3232 key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
3333 - name : Install dependencies
Original file line number Diff line number Diff line change 1+ # workflow copied from combination of
2+ # 1) https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3+ # 2) https://www.caktusgroup.com/blog/2021/02/11/automating-pypi-releases/
4+
5+ name : pypi-release
6+
7+ on :
8+ release :
9+ types : [created]
10+
11+ jobs :
12+ deploy :
13+ name : Build and publish Python distribution to PyPI
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@master
18+ - name : Set up Python 3.10
19+ uses : actions/setup-python@v3
20+ with :
21+ python-version : " 3.10"
22+
23+ - name : Install pypa/build
24+ run : >-
25+ python -m
26+ pip install
27+ build
28+ --user
29+ - name : Build a binary wheel and a source tarball
30+ run : >-
31+ python -m
32+ build
33+ --sdist
34+ --wheel
35+ --outdir dist/
36+ .
37+ - name : Publish distribution to PyPI
38+ uses : pypa/gh-action-pypi-publish@release/v1
39+ with :
40+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 11# This workflow will install Python dependencies, run tests and lint with a single version of Python
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
4- name : build
4+ name : python-app
55
66on :
77 push :
You can’t perform that action at this time.
0 commit comments