File tree Expand file tree Collapse file tree 6 files changed +88
-1
lines changed Expand file tree Collapse file tree 6 files changed +88
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ publish :
10+ name : " Publish release"
11+ runs-on : " ubuntu-latest"
12+
13+ environment :
14+ name : deploy
15+
16+ steps :
17+ - uses : " actions/checkout@v2"
18+ - uses : " actions/setup-python@v2"
19+ with :
20+ python-version : 3.7
21+ - name : " Install dependencies"
22+ run : " scripts/install"
23+ - name : " Build package & docs"
24+ run : " scripts/build"
25+ - name : " Publish to PyPI & deploy docs"
26+ run : " scripts/publish"
27+ env :
28+ TWINE_USERNAME : ${{ secrets.TWINE_USERNAME }}
29+ TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
Original file line number Diff line number Diff line change 11# following PEP 386
2- __version__ = "2.3.4 "
2+ __version__ = "2.3.5 "
Original file line number Diff line number Diff line change 1+ twine==4.0.0
2+ wheel==0.37.1
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ if [ -d ' venv' ] ; then
4+ PREFIX=" venv/bin/"
5+ else
6+ PREFIX=" "
7+ fi
8+
9+ set -x
10+
11+ ${PREFIX} python setup.py sdist bdist_wheel
12+ ${PREFIX} twine check dist/*
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ # Use the Python executable provided from the `-p` option, or a default.
4+ [ " $1 " = " -p" ] && PYTHON=$2 || PYTHON=" python3"
5+
6+ REQUIREMENTS=" requirements/publish.txt"
7+ VENV=" venv"
8+
9+ set -x
10+
11+ if [ -z " $GITHUB_ACTIONS " ]; then
12+ " $PYTHON " -m venv " $VENV "
13+ PIP=" $VENV /bin/pip"
14+ else
15+ PIP=" pip"
16+ fi
17+
18+ " $PIP " install -r " $REQUIREMENTS "
19+ " $PIP " install -e .
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ VERSION_FILE=" compressor/__init__.py"
4+
5+ if [ -d ' venv' ] ; then
6+ PREFIX=" venv/bin/"
7+ else
8+ PREFIX=" "
9+ fi
10+
11+ if [ ! -z " $GITHUB_ACTIONS " ]; then
12+ git config --local user.email " 41898282+github-actions[bot]@users.noreply.github.com"
13+ git config --local user.name " GitHub Action"
14+
15+ VERSION=` grep __version__ ${VERSION_FILE} | grep -o ' [0-9][^"]*' `
16+
17+ if [ " refs/tags/${VERSION} " != " ${GITHUB_REF} " ] ; then
18+ echo " GitHub Ref '${GITHUB_REF} ' did not match package version '${VERSION} '"
19+ exit 1
20+ fi
21+ fi
22+
23+ set -x
24+
25+ ${PREFIX} twine upload dist/*
You can’t perform that action at this time.
0 commit comments