Skip to content
This repository was archived by the owner on May 4, 2025. It is now read-only.

Commit 304d7e7

Browse files
👷 Fix GHA release workflow.
1 parent e8a186f commit 304d7e7

File tree

2 files changed

+34
-41
lines changed

2 files changed

+34
-41
lines changed

‎.github/workflows/draft-release.yaml‎

Lines changed: 0 additions & 39 deletions
This file was deleted.

‎.github/workflows/test.yaml‎

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ jobs:
4141
shell: bash
4242
steps:
4343
- uses: actions/checkout@v4
44-
with:
45-
ref: ${{ github.event.release.tag_name }}
44+
4645
- name: Set up Python ${{ matrix.python-version }}
4746
uses: actions/setup-python@v5
4847
with:
@@ -61,3 +60,36 @@ jobs:
6160

6261
- name: Run pytest
6362
run: uv run pytest
63+
64+
release-draft:
65+
name: Draft Release
66+
needs: tests
67+
runs-on: ubuntu-latest
68+
if: startsWith(github.ref, 'refs/tags/v')
69+
70+
permissions:
71+
contents: write
72+
73+
steps:
74+
- name: Checkout Repository
75+
uses: actions/checkout@v4
76+
77+
- name: Install uv
78+
uses: astral-sh/setup-uv@v3
79+
with:
80+
enable-cache: true
81+
82+
- name: Build Project
83+
run: uv build
84+
85+
- name: Create Draft Release
86+
env:
87+
TAG_NAME: ${{ github.ref_name }}
88+
GH_TOKEN: ${{ github.token }}
89+
run: |
90+
gh release create "$TAG_NAME" \
91+
--repo "$GITHUB_REPOSITORY" \
92+
--title "${GITHUB_REPOSITORY#*/} ${TAG_NAME#v}" \
93+
--generate-notes \
94+
--draft \
95+
dist/*.tar.gz dist/*.whl

0 commit comments

Comments
 (0)