diff --git a/.autorc b/.autorc index 805cd381..c1765209 100644 --- a/.autorc +++ b/.autorc @@ -1,7 +1,15 @@ { - "onlyPublishWithReleaseLabel": true, "baseBranch": "master", "author": "DANDI Bot ", "noVersionPrefix": true, - "plugins": ["git-tag"] + "plugins": [ + "git-tag", + [ + "exec", + { + "afterRelease": "python -m build && twine upload dist/*" + } + ], + "released" + ] } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbefa49b..9c565864 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,10 +5,10 @@ on: push: branches: - master + workflow_dispatch: env: - # Pin to v10.28.0, which (as of 2021-05-25) is the latest version with assets - AUTO_VERSION: v11.0.5 + AUTO_VERSION: v11.3.6 jobs: release-check: @@ -104,9 +104,12 @@ jobs: - name: Create release run: | - ~/auto shipit -vv - python -m build - twine upload dist/* + echo "@${{ github.actor }} is creating a release triggered by ${{ github.event_name }}" + if [ "${{ github.event_name }}" = workflow_dispatch ] + then opts= + else opts=--only-publish-with-release-label + fi + ~/auto shipit -vv $opts env: GH_TOKEN: ${{ secrets.DANDI_GITHUB_TOKEN }} TWINE_USERNAME: __token__