Skip to content

Commit 9783238

Browse files
authored
refactor: 👷 move uv build step into publish job (#101)
# Description Since I made the `release-project` generic, I had to move the package build step into the publish job. That way it also doesn't need to upload/download the `dist/` files between jobs. No review needed.
1 parent 08687cd commit 9783238

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/release-package.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ on:
99
permissions: read-all
1010

1111
jobs:
12-
release-package:
12+
release:
1313
# This job outputs env variables `previous_version` and `current_version`.
1414
# Only give permissions for this job.
1515
permissions:
1616
contents: write
17-
uses: seedcase-project/.github/.github/workflows/reusable-release-package.yml@main
17+
uses: seedcase-project/.github/.github/workflows/reusable-release-project.yml@main
1818
with:
1919
app-id: ${{ vars.UPDATE_VERSION_APP_ID }}
2020
secrets:
@@ -30,18 +30,20 @@ jobs:
3030
environment:
3131
name: pypi
3232
needs:
33-
- release-package
34-
if: ${{ needs.release-package.outputs.previous_version != needs.release-package.outputs.current_version }}
33+
- release
34+
if: ${{ needs.release.outputs.previous_version != needs.release.outputs.current_version }}
3535
steps:
36-
- name: Download built distributions
37-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
38-
with:
39-
name: release-dists
40-
path: dist/
41-
36+
# This workflow and the publish workflows are based on:
37+
# - https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
38+
# - https://www.andrlik.org/dispatches/til-use-uv-for-build-and-publish-github-actions/
39+
# - https://github.com/astral-sh/trusted-publishing-examples
4240
- name: Set up uv
4341
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
4442

43+
- name: Build distributions
44+
# Builds dists from source and stores them in the dist/ directory.
45+
run: uv build
46+
4547
- name: Publish 📦 to PyPI
4648
# Only publish if the option is explicitly set in the calling workflow.
4749
run: uv publish --trusted-publishing always

0 commit comments

Comments
 (0)