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 e0f2a91
Show file tree
Hide file tree
Showing 4 changed files with 10 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
1 change: 1 addition & 0 deletions bin/github-workflow_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* pip install check-jsonschema
* pip install typer >= 0.12.5
* pip install typing-extensions
GITHUB WORKFLOW SCHEMA:
Expand Down
4 changes: 4 additions & 0 deletions py.requirements/develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ wheel
# -- PYTHON2/PYTHON3 COMPATIBILITY:
modernize >= 0.5

# -- PYTHON 3 TYPE HINTS:
typing-extensions; python_version >= '3.8'
typer >= 0.12.5; python_version >= '3.7'

# -- LINTERS:
ruff; python_version >= '3.7'
pylint
Expand Down

0 comments on commit e0f2a91

Please sign in to comment.