File tree Expand file tree Collapse file tree 3 files changed +60
-21
lines changed Expand file tree Collapse file tree 3 files changed +60
-21
lines changed Original file line number Diff line number Diff line change
1
+ # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2
+ name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
3
+
4
+ on :
5
+ - push
6
+
7
+ jobs :
8
+ build-n-publish :
9
+ name : Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
10
+ if : startsWith(github.ref, 'refs/tags')
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@master
14
+ with :
15
+ # https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
16
+ fetch-depth : 0
17
+ - name : Set up Python
18
+ uses : actions/setup-python@v1
19
+ with :
20
+ python-version : " 3.10"
21
+ - name : Install pypa/build
22
+ run : python -m pip install build --user
23
+ - name : Build a binary wheel and a source tarball
24
+ run : python -m build --sdist --wheel --outdir dist/ .
25
+ - name : Publish distribution 📦 to PyPI
26
+ uses : pypa/gh-action-pypi-publish@release/v1
27
+ with :
28
+ user : __token__
29
+ password : ${{ secrets.PYPI_API_TOKEN }}
30
+ print_hash : true
31
+ verify_metadata : true
Original file line number Diff line number Diff line change
1
+ name : Testing
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ python-version : ['3.7', '3.11']
15
+
16
+ steps :
17
+ - uses : actions/checkout@v1
18
+ - name : Set up Python ${{ matrix.python-version }}
19
+ uses : actions/setup-python@v2
20
+ with :
21
+ python-version : ${{ matrix.python-version }}
22
+ - name : Install dependencies
23
+ run : |
24
+ python -m pip install --upgrade pip
25
+ python -m pip install flake8 numpy
26
+ - name : Test with tox
27
+ run : |
28
+ flake8 picoscope setup.py
29
+ flake8 examples/*
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments