Skip to content

Commit f07babe

Browse files
amd and arm pypi wheels on push
1 parent 72215f6 commit f07babe

1 file changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,50 @@ on:
99
types: [created]
1010

1111
jobs:
12-
pypi-publish:
13-
name: Publish package to PyPI
14-
runs-on: ubuntu-latest
15-
environment:
16-
name: pypi
17-
url: https://pypi.org/p/hwcomponents-adc
18-
permissions:
19-
id-token: write
12+
build-package:
13+
name: Build package on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest]
2018
steps:
2119
- uses: actions/checkout@v4
2220
with:
23-
fetch-depth: 0 # Fetch all history and tags for setuptools-scm
24-
submodules: recursive # Check out all submodules
25-
- name: Initialize and update submodules
26-
run: |
27-
git submodule update --init --recursive
21+
fetch-depth: 0
22+
submodules: recursive
2823
- name: Set up Python
29-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
3025
with:
3126
python-version: "3.12"
3227
- name: Install dependencies
3328
run: |
3429
python -m pip install --upgrade pip
3530
pip install build
3631
- name: Build package
37-
working-directory: .
3832
env:
3933
PYTHONPATH: ${{ github.workspace }}
4034
run: |
4135
python -m build
36+
- name: Upload distributions
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: dist-${{ matrix.os }}
40+
path: dist/*
41+
42+
pypi-publish:
43+
name: Publish package to PyPI
44+
runs-on: ubuntu-latest
45+
needs: build-package
46+
environment:
47+
name: pypi
48+
url: https://pypi.org/p/hwcomponents-adc
49+
permissions:
50+
id-token: write
51+
steps:
52+
- uses: actions/download-artifact@v4
53+
with:
54+
pattern: dist-*
55+
merge-multiple: true
56+
path: dist
4257
- name: Publish package distributions to PyPI
4358
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)