Skip to content

Commit

Permalink
CI: release-to-pypi workflow
Browse files Browse the repository at this point in the history
* Add guard to use only for versionized tags/releases
  • Loading branch information
jenisys committed Aug 31, 2024
1 parent a94270e commit 7405bf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ source_env_if_exists .envrc.use_venv
# -- SETUP-PYTHON: Prepend ${HERE} to PYTHONPATH (as PRIMARY search path)
# SIMILAR TO: export PYTHONPATH="${HERE}:${PYTHONPATH}"
path_add PYTHONPATH .
path_add PATH bin

# DISABLED: source_env_if_exists .envrc.override
7 changes: 4 additions & 3 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ name: release-to-pypi
on:
release:
types: [published]
# MAYBE: if: github.event_name == "push" && startsWith(github.ref, "refs/tags/v")

tags:
- v0.*
- v1.*
permissions:
contents: read

jobs:
publish-package:
runs-on: ubuntu-latest
# MAYBE: if: github.event_name == "push" && startsWith(github.ref, "refs/tags/v")
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment:
name: pypi
url: https://pypi.org/p/parse-type
Expand Down

0 comments on commit 7405bf3

Please sign in to comment.