Skip to content

Commit

Permalink
chg: dev: update pypi publish step to use api token plus readme cleanup
Browse files Browse the repository at this point in the history
* using release workflow to publish pypi packages needs first-time setup
* first see the upstream readme for how to setup the token secret
* then uncomment the publish step in release.yml and commit
  https://github.com/pypa/gh-action-pypi-publish
* finally push a tag and wait....

Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org>
  • Loading branch information
sarnold committed Sep 15, 2022
1 parent 2953755 commit 52f72a0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: packages
path: ./dist/pystache*
path: ./dist/pystache-*

create_release:
name: Create Release
Expand Down Expand Up @@ -83,12 +83,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
name: Release v${{ env.VERSION }}
name: Release ${{ env.VERSION }}
body_path: CHANGES.md
draft: false
prerelease: false
files: |
packages/pystache*
packages/pystache-*
# When a GitHub release is made, upload the artifacts to PyPI
upload:
Expand All @@ -105,7 +105,8 @@ jobs:
run: find . -maxdepth 2 -name pystache-\* -type f

# - name: Publish bdist and sdist packages
# uses: pypa/gh-action-pypi-publish@v1.4.1
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.pypi_password }}
# password: ${{ secrets.PYPI_API_TOKEN }}
# packages_dir: packages/
# print_hash: true
24 changes: 17 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,17 @@ Pystache is tested with:
JSON support is needed only for the command-line interface and to run
the spec tests; PyYAML can still be used (see the Develop section).

Official support for Python 2 will end with Pystache version 0.6.0.
Official support for Python 2 has ended with Pystache version 0.6.0.


.. note:: This project uses versioningit_ to generate and maintain the
version file, which only gets included in the sdist/wheel
packages. In a fresh clone, running any of the tox_ commands
should generate the current version file.

.. _versioningit: https://github.com/jwodder/versioningit
.. _tox: https://github.com/tox-dev/tox


Quick Start
===========
Expand Down Expand Up @@ -179,35 +189,35 @@ default to values set in Pystache's ``defaults`` module.
Develop
=======

To test from a source distribution (without installing):
To test from a source distribution (without installing)::

$ python test_pystache.py

To test Pystache with multiple versions of Python (with a single
command!) and different platforms, you can use [tox](https://pypi.python.org/pypi/tox):
command!) and different platforms, you can use [tox](https://pypi.python.org/pypi/tox)::

$ pip install tox
$ tox -e py

To run tests on multiple versions with coverage, run:
To run tests on multiple versions with coverage, run::

$ tox -e py38-linux,py39-linux # for example

(substitute your platform above, eg, macos or windows)

The source distribution tests also include doctests and tests from the
Mustache spec. To include tests from the Mustache spec in your test
runs:
runs::

$ git submodule update --init

The test harness parses the spec's (more human-readable) yaml files if
`PyYAML <http://pypi.python.org/pypi/PyYAML>`__ is present. Otherwise,
it parses the json files. To install PyYAML--
it parses the json files. To install PyYAML::

$ pip install pyyaml # note this is installed automatically by tox

Once the submodule is available, you can run the full test set with:
Once the submodule is available, you can run the full test set with::

$ tox -e setup ext/spec/specs

Expand Down

0 comments on commit 52f72a0

Please sign in to comment.