Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Updated the workflow file for the v4 of upload-artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 1, 2024
1 parent 91054d1 commit a579227
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: swiftest

on:
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
Expand All @@ -11,32 +13,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, macos-12, macos-13]
cibw_archs: [x86_64]
include:
- os: ubuntu-latest
cibw_archs: "aarch64"
env:
SYSTEM_VERSION_COMPAT: 0
os: [ubuntu-latest, macos-11, macos-13, macos-13, macos-14]

steps:
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
uses: pypa/cibuildwheel@v2.16.5

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -50,4 +37,26 @@ jobs:

- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/swiftest
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

0 comments on commit a579227

Please sign in to comment.