Skip to content

Commit 0b7ea15

Browse files
github-actions[bot]AntoineGautier
authored andcommitted
chore: remove staging validation marker
1 parent e4047ee commit 0b7ea15

4 files changed

Lines changed: 66 additions & 37 deletions

File tree

.github/workflows/master-release.yml

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ jobs:
3939
exit 1
4040
fi
4141
42-
# Check if staging is ahead of master
43-
git fetch origin master
44-
AHEAD=$(git rev-list --count origin/master..staging)
45-
if [ "$AHEAD" -eq "0" ]; then
46-
echo "❌ Staging branch has no commits ahead of master"
47-
exit 1
48-
fi
49-
50-
echo "✅ Staging is $AHEAD commits ahead of master"
51-
5242
- name: Check version from staging validation
5343
id: get-version
5444
run: |
@@ -138,6 +128,43 @@ jobs:
138128
with:
139129
ref: master
140130

131+
- name: Download artifacts from Staging Release Workflow
132+
id: download-artifacts
133+
uses: dawidd6/action-download-artifact@v11
134+
with:
135+
workflow: staging-release.yml
136+
workflow_conclusion: success
137+
name: binaries-.*
138+
name_is_regexp: true
139+
path: pyfunnel/lib/
140+
merge-multiple: true
141+
142+
- name: Flatten artifact structure
143+
run: |
144+
# Move files from nested directories to target structure
145+
find pyfunnel/lib/binaries-* -type f -exec sh -c '
146+
for file; do
147+
# Extract the platform directory (darwin64, linux64, win64)
148+
platform_dir=$(dirname "$file" | sed "s/.*binaries-[^/]*\///")
149+
target_dir="pyfunnel/lib/$platform_dir"
150+
mkdir -p "$target_dir"
151+
mv "$file" "$target_dir/"
152+
done
153+
' _ {} +
154+
155+
# Clean up empty artifact directories
156+
rm -rf pyfunnel/lib/binaries-*
157+
158+
- name: Check for binaries
159+
run: |
160+
if [ -d "pyfunnel/lib" ] && [ "$(ls -A pyfunnel/lib)" ]; then
161+
echo "✅ Binaries found in pyfunnel/lib"
162+
ls -la pyfunnel/lib/
163+
else
164+
echo "❌ No binaries found in pyfunnel/lib"
165+
exit 1
166+
fi
167+
141168
- name: Extract release notes from changelog
142169
id: release_notes
143170
run: |
@@ -156,25 +183,35 @@ jobs:
156183
- name: Install build dependencies
157184
run: |
158185
python -m pip install --upgrade pip
159-
python -m pip install build twine
186+
python -m pip install --upgrade build twine setuptools wheel
160187
161188
- name: Build package
162-
run: python -m build --sdist --wheel .
163-
164-
- name: Create GH Release
165-
env:
166-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167-
run: | # The following will create the git tag.
168-
gh release create "${{ needs.validate-staging.outputs.release-tag }}" dist/* \
169-
--title "${{ needs.validate-staging.outputs.release-tag }}" \
170-
--notes "${{ steps.release_notes.outputs.content }}"
171-
172-
- name: Publish to PyPI
173-
env:
174-
TWINE_USERNAME: __token__
175-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
176189
run: |
177-
python -m twine upload dist/*
190+
# Clean any previous builds
191+
rm -rf dist/ build/ *.egg-info/
192+
# Build
193+
python -m build --sdist --wheel .
194+
# Verify the built packages
195+
echo "Built packages:"
196+
ls -la dist/
197+
# Check wheel contents
198+
python -m zipfile -l dist/*.whl | head -30
199+
python -m twine check dist/*
200+
201+
# - name: Create GH Release
202+
# env:
203+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204+
# run: | # The following will create the git tag.
205+
# gh release create "${{ needs.validate-staging.outputs.release-tag }}" dist/* \
206+
# --title "${{ needs.validate-staging.outputs.release-tag }}" \
207+
# --notes "${{ steps.release_notes.outputs.content }}"
208+
209+
# - name: Publish to PyPI
210+
# env:
211+
# TWINE_USERNAME: __token__
212+
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
213+
# run: |
214+
# python -m twine upload dist/*
178215

179216
notify-completion:
180217
needs: [validate-staging, merge-to-master, publish-release]

.github/workflows/staging-release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ jobs:
9090
path: pyfunnel/lib/
9191
merge-multiple: true
9292

93-
- name: Debug - List downloaded artifacts
94-
run: |
95-
echo "Contents of pyfunnel/lib/ after artifact download:"
96-
find pyfunnel/lib/ -type f -ls || echo "No files found"
97-
9893
- name: Setup Python
9994
uses: actions/setup-python@v4
10095
with:

.staging-validated

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

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ authors = [
66
]
77
description = "Comparison tool for two (x, y) data sets given tolerances in x and y directions"
88
readme = "README.md"
9-
license = {file = "LICENSE.txt"}
9+
license = "BSD-3-Clause"
10+
license-files = ["LICENSE.txt"]
1011
requires-python = ">=3.8"
1112
classifiers = [
1213
"Development Status :: 5 - Production/Stable",
1314
"Environment :: Console",
14-
"License :: OSI Approved :: BSD License",
1515
"Programming Language :: Python :: 3.8",
1616
"Programming Language :: C",
1717
"Intended Audience :: End Users/Desktop",
@@ -28,6 +28,7 @@ dev = [
2828
publish = [
2929
"commitizen>=4.8.2",
3030
"twine>=4.0.0",
31+
"build>=1.0.0",
3132
]
3233

3334
[build-system]

0 commit comments

Comments
 (0)