Repository navigation
103 lines (88 loc) · 2.98 KB
/
Copy pathdal-python-release.yml
File metadata and controls
103 lines (88 loc) · 2.98 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: dal-python wheels and PyPI release
on:
push:
tags:
- dal-python-v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
prepare:
name: Validate release tag
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Check tag provenance and version
shell: bash
run: |
test "$(git cat-file -t "${GITHUB_REF}")" = "tag"
git fetch --no-tags origin master
test "$(git rev-parse FETCH_HEAD)" = "${GITHUB_SHA}"
test "$(git rev-parse "${GITHUB_REF}^{commit}")" = "${GITHUB_SHA}"
python dal-python/scripts/verify_release.py \
--version-only --tag "${GITHUB_REF_NAME}" --check-pypi
wheels:
name: ${{ matrix.platform }} wheels
needs: prepare
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
platform: linux-x86_64
- os: windows-2022
platform: windows-amd64
- os: macos-15-intel
platform: macos-x86_64
- os: macos-15
platform: macos-arm64
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Check out pinned dependencies
run: python .github/scripts/checkout_dependencies.py
- name: Build and test wheels
uses: pypa/cibuildwheel@adba99c781d3746d38b3a09b1cf797965bcb7fe6 # v4.3.0
with:
package-dir: dal-python
output-dir: wheelhouse
- name: Upload wheel artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: wheels-${{ matrix.platform }}
path: wheelhouse/*.whl
if-no-files-found: error
compression-level: 0
retention-days: 30
publish:
name: Publish wheels to PyPI
needs: [prepare, wheels]
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/project/dal-python/
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Download wheels
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: wheels-*
path: wheelhouse
merge-multiple: true
- name: Validate release tag and wheels
shell: bash
run: |
test "$(git cat-file -t "${GITHUB_REF}")" = "tag"
test "$(git rev-parse "${GITHUB_REF}^{commit}")" = "${GITHUB_SHA}"
python dal-python/scripts/verify_release.py \
--dist-dir wheelhouse --tag "${GITHUB_REF_NAME}" --check-pypi
- name: Publish exact wheel artifacts
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
packages-dir: wheelhouse