Skip to content

Commit

Permalink
Drop workflow_dispatch build method
Browse files Browse the repository at this point in the history
It causes unnecessary complication: because `python -m build` needs `git tag` to have been run already, so we needed to awkwardly both run that ourselves and then feed it into action-gh-release which redoes the tagging.

Instead, make only one way to do it: click to the Releases page and make a release from there, which guarantees the tag to be pre-created.
  • Loading branch information
kousu committed Apr 20, 2022
1 parent bfc3583 commit 5c70f88
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ on:
release:
types: [published]

# publish from the Actions page:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true

jobs:
publish:
name: Publish Package
Expand All @@ -23,14 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Create given tag
# because we use setuptools_scm, the tag needs to exist before running `build`
# this is a bit redundant because softprops/action-gh-release will recreate the
# same tag, on github
if: github.event.inputs.version
run: |
git tag -f "${{ github.event.inputs.version }}"
- uses: actions/setup-python@v3

- name: Install dependencies
Expand All @@ -46,7 +31,6 @@ jobs:
with:
files: 'dist/*'
fail_on_unmatched_files: true
tag_name: ${{ github.event.inputs.version }} # in the workflow_dispatch case, make a new tag from the given input; in the published release case, this will be empty and will fall back to updating that release.

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit 5c70f88

Please sign in to comment.