Skip to content

Commit aef5f1a

Browse files
authored
fix(release): incorporate the release wheels into release.yaml (#297)
1 parent a47fa2c commit aef5f1a

2 files changed

Lines changed: 53 additions & 58 deletions

File tree

.github/workflows/build-wheels.yaml

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

.github/workflows/release.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,56 @@ jobs:
109109
run: |
110110
cd docs
111111
make html
112+
113+
wheels:
114+
name: Build wheel (${{ matrix.os }})
115+
runs-on: ${{ matrix.os }}
116+
strategy:
117+
matrix:
118+
os: [ubuntu-latest, windows-latest, macos-latest]
119+
120+
steps:
121+
- uses: actions/checkout@v4
122+
123+
- uses: actions/setup-python@v5
124+
with:
125+
python-version: "3.12"
126+
127+
- name: Install poetry
128+
run: pipx install poetry
129+
130+
- name: Extract version
131+
id: version
132+
shell: bash
133+
run: echo "version=$(poetry version -s)" >> "$GITHUB_OUTPUT"
134+
135+
- name: Build wheels
136+
run: poetry build
137+
138+
- name: Upload artifacts
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: pysus-${{ steps.version.outputs.version }}-${{ matrix.os }}
142+
path: dist/
143+
if-no-files-found: error
144+
145+
github-release:
146+
name: GitHub Release
147+
needs: wheels
148+
if: startsWith(github.ref, 'refs/tags/')
149+
runs-on: ubuntu-latest
150+
permissions:
151+
contents: write
152+
153+
steps:
154+
- uses: actions/download-artifact@v4
155+
with:
156+
pattern: pysus-*-*
157+
path: dist/
158+
merge-multiple: true
159+
160+
- name: Create release
161+
uses: softprops/action-gh-release@v2
162+
with:
163+
files: dist/*
164+
generate_release_notes: true

0 commit comments

Comments
 (0)