Skip to content

Commit caf5d21

Browse files
committed
fix: publish action missing build step
1 parent 98ef321 commit caf5d21

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
test:
99
uses: sscovil/python-dev-cli/.github/workflows/test.yml@main
10+
1011
publish:
1112
if: github.repository == 'sscovil/python-dev-cli'
1213
needs: [test]
@@ -18,5 +19,17 @@ jobs:
1819
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1920
steps:
2021
- uses: actions/checkout@v3
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.11"
26+
- name: Build package
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install ".[publish]"
30+
python -m build --sdist --wheel .
2131
- name: Publish package
2232
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
skip-existing: true # Skip upload if package with same version already exists
35+
verbose: true # Print a lot of debugging information, for troubleshooting

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to
66
[Semantic Versioning](http://semver.org/).
77

8+
## [1.0.5] - 2023-09-25
9+
10+
### Fixed
11+
12+
- GitHub Action `publish` workflow missing build step
13+
814
## [1.0.4] - 2023-09-25
915

1016
### Added

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Issues = "https://github.com/sscovil/python-dev-cli/issues"
4747
Changelog = "https://github.com/sscovil/python-dev-cli/blob/main/CHANGELOG.md"
4848

4949
[project.optional-dependencies]
50-
dev = ["black ~=23.9.1", "build ~=1.0.3", "pre-commit ~=3.4.0", "ruff ~=0.0.291", "twine ~=4.0.2"]
50+
dev = ["black ~=23.9.1", "pre-commit ~=3.4.0", "ruff ~=0.0.291"]
51+
publish = ["build ~=1.0.3", "twine ~=4.0.2"]
5152

5253
[tool.black]
5354
extend-exclude = "_version.py"

0 commit comments

Comments
 (0)