Skip to content

Commit e0f2a91

Browse files
committed
CI: release-to-pypi workflow
* Add guard to use only for versionized tags/releases
1 parent a94270e commit e0f2a91

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ source_env_if_exists .envrc.use_venv
2323
# -- SETUP-PYTHON: Prepend ${HERE} to PYTHONPATH (as PRIMARY search path)
2424
# SIMILAR TO: export PYTHONPATH="${HERE}:${PYTHONPATH}"
2525
path_add PYTHONPATH .
26+
path_add PATH bin
2627

2728
# DISABLED: source_env_if_exists .envrc.override

.github/workflows/release-to-pypi.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ name: release-to-pypi
1919
on:
2020
release:
2121
types: [published]
22-
# MAYBE: if: github.event_name == "push" && startsWith(github.ref, "refs/tags/v")
23-
22+
tags:
23+
- v0.*
24+
- v1.*
2425
permissions:
2526
contents: read
2627

2728
jobs:
2829
publish-package:
2930
runs-on: ubuntu-latest
30-
# MAYBE: if: github.event_name == "push" && startsWith(github.ref, "refs/tags/v")
31+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
3132
environment:
3233
name: pypi
3334
url: https://pypi.org/p/parse-type

bin/github-workflow_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
2323
* pip install check-jsonschema
2424
* pip install typer >= 0.12.5
25+
* pip install typing-extensions
2526
2627
GITHUB WORKFLOW SCHEMA:
2728

py.requirements/develop.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ wheel
1616
# -- PYTHON2/PYTHON3 COMPATIBILITY:
1717
modernize >= 0.5
1818

19+
# -- PYTHON 3 TYPE HINTS:
20+
typing-extensions; python_version >= '3.8'
21+
typer >= 0.12.5; python_version >= '3.7'
22+
1923
# -- LINTERS:
2024
ruff; python_version >= '3.7'
2125
pylint

0 commit comments

Comments
 (0)