Skip to content

Commit

Permalink
bump version, merge pull request #6 from AMYPAD/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Nov 20, 2020
2 parents af71fdf + f5c9b4b commit 99aa390
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
tag: # /tag <tagname> <commit>
if: startsWith(github.event.comment.body, '/tag ')
Expand Down Expand Up @@ -32,10 +33,13 @@ jobs:
comment_id: context.payload.comment.id, content: "eyes"})
- name: Tag Commit
run: |
git tag $(echo "$BODY" | awk '{print $2" "$3}')
git push --tags
git clone https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} repo
git -C repo tag $(echo "$BODY" | awk '{print $2" "$3}')
git -C repo push --tags
rm -rf repo
env:
BODY: ${{ github.event.comment.body }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: React Success
uses: actions/github-script@v2
with:
Expand Down
46 changes: 40 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,43 @@ jobs:
name: PyPI Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: casperdcl/deploy-pypi@v1
with:
password: ${{ secrets.PYPI_TOKEN }}
build: true
gpg_key: ${{ secrets.GPG_KEY }}
- uses: actions/checkout@v2
- uses: casperdcl/deploy-pypi@v1
with:
build: true
gpg_key: ${{ secrets.GPG_KEY }}
password: ${{ secrets.PYPI_TOKEN }}
- id: collect_assets
name: Collect assets
run: |
echo "::set-output name=asset_path::$(ls dist/*.whl)"
echo "::set-output name=asset_name::$(basename dist/*.whl)"
echo "::set-output name=asset_path_sig::$(ls dist/*.whl.asc 2>/dev/null)"
echo "::set-output name=asset_name_sig::$(basename dist/*.whl.asc 2>/dev/null)"
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: miutil ${{ github.ref }} beta
body_path: _CHANGES.md
draft: true
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.collect_assets.outputs.asset_path }}
asset_name: ${{ steps.collect_assets.outputs.asset_name }}
asset_content_type: application/zip
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.collect_assets.outputs.asset_path_sig }}
asset_name: ${{ steps.collect_assets.outputs.asset_name_sig }}
asset_content_type: text/plain
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ miutil

Medical imaging utilities.

|Versions| |Py-Versions| |Tests| |Coverage| |LICENCE|
|Version| |Py-Versions| |Tests| |Coverage| |DOI| |LICENCE|

Basic functionality needed for `AMYPAD <https://github.com/AMYPAD/AMYPAD>`_
and `NiftyPET <https://github.com/NiftyPET/NiftyPET>`_.
Expand Down Expand Up @@ -34,13 +34,15 @@ To install extras and their dependencies,
use the package name ``miutil[option1,option2]``.


.. |Tests| image:: https://img.shields.io/github/workflow/status/AMYPAD/miutil/Test
.. |Tests| image:: https://img.shields.io/github/workflow/status/AMYPAD/miutil/Test?logo=GitHub
:target: https://github.com/AMYPAD/miutil/actions
.. |Coverage| image:: https://codecov.io/gh/AMYPAD/miutil/branch/master/graph/badge.svg
:target: https://codecov.io/gh/AMYPAD/miutil
.. |Versions| image:: https://img.shields.io/pypi/v/miutil.svg
.. |Version| image:: https://img.shields.io/pypi/v/miutil.svg?logo=python&logoColor=white
:target: https://github.com/AMYPAD/miutil/releases
.. |Py-Versions| image:: https://img.shields.io/pypi/pyversions/miutil.svg?logo=python&logoColor=white
:target: https://pypi.org/project/miutil
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4281542.svg
:target: https://doi.org/10.5281/zenodo.4281542
.. |LICENCE| image:: https://img.shields.io/pypi/l/miutil.svg
:target: https://raw.githubusercontent.com/AMYPAD/miutil/master/LICENCE.md

0 comments on commit 99aa390

Please sign in to comment.