@@ -2,7 +2,7 @@ name: Test
22on : [push, pull_request]
33jobs :
44 check :
5- if : github.event_name != 'pull_request' || github.head_ref != 'devel '
5+ if : startsWith( github.ref, 'refs/tags') || github. event_name == 'pull_request' || github.repository_owner != 'iterative '
66 name : Check
77 runs-on : ubuntu-latest
88 steps :
2424 REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525 - run : pre-commit run -a --show-diff-on-failure
2626 test :
27- if : github.event_name != 'pull_request' || github.head_ref != 'devel '
27+ if : startsWith( github.ref, 'refs/tags') || github. event_name == 'pull_request' || github.repository_owner != 'iterative '
2828 name : Test py${{ matrix.python }}
2929 runs-on : ubuntu-latest
3030 strategy :
@@ -55,15 +55,19 @@ jobs:
5555 requirements : twine setuptools wheel setuptools_scm[toml]
5656 build : true
5757 password : ${{ secrets.PYPI_TOKEN }}
58- upload : ${{ github.event_name == 'push' && startsWith(github.event. ref, 'refs/tags') }}
58+ upload : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
5959 - name : Changelog
6060 run : git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
61- - if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
61+ - id : meta
62+ name : Metadata
63+ run : |
64+ echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
65+ - if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
6266 uses : softprops/action-gh-release@v1
6367 env :
6468 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
6569 with :
66- name : shtab ${{ github.ref }} beta
70+ name : shtab ${{ steps.meta.outputs.tag }} beta
6771 body_path : _CHANGES.md
6872 draft : true
6973 files : |
0 commit comments