-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (73 loc) · 2.39 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Release
on:
push:
tags: ['v*']
defaults:
run:
shell: bash
jobs:
build_wheels:
name: Build wheels for ${{ matrix.platform-id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
platform-id: manylinux_x86_64
- os: ubuntu-20.04
platform-id: manylinux_aarch64
- os: windows-2019
platform-id: win_amd64
- os: macos-13
platform-id: macosx_x86_64
- os: macos-14
platform-id: macosx_arm64
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up QEMU
if: matrix.platform-id == 'manylinux_aarch64'
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
with:
platforms: arm64
- name: Build wheels
uses: pypa/cibuildwheel@7e5a838a63ac8128d71ab2dfd99e4634dd1bca09 # v2.19.2
env:
CIBW_BUILD: cp310-${{ matrix.platform-id }}
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: artifact-${{ matrix.platform-id }}
path: ./wheelhouse/*.whl
retention-days: 1
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: '3.10'
- name: Build sdist
run: |
python -m pip install build scikit-build-core
python -m build --sdist --outdir dist
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: artifact-sdist
path: ./dist/*.tar.gz
retention-days: 1
upload_to_pypi:
name: 'Upload to PyPI'
if: github.repository == 'Nixtla/coreforecast'
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: dist
pattern: 'artifact-*'
merge-multiple: true
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0