Skip to content

Commit

Permalink
chg: dev: update pypi publish step to use api token plus 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 a4b0358 commit b4e01b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,35 +179,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 b4e01b0

Please sign in to comment.