forked from Eventual-Inc/Daft
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (80 loc) · 2.21 KB
/
publish-pypi.yml
File metadata and controls
89 lines (80 loc) · 2.21 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
name: Build and publish package to PyPI
on:
push:
tags:
- v*
permissions: {}
env:
PYTHON_VERSION: 3.11
UV_SYSTEM_PYTHON: 1
DAFT_ANALYTICS_ENABLED: "0"
DAFT_PROGRESS_BAR: 0
defaults:
run:
shell: bash
jobs:
build:
name: "Build Daft wheel for ${{ matrix.os }}-${{ matrix.arch }}-lts=${{ matrix.lts }}"
permissions:
contents: read
uses: ./.github/workflows/build-wheel.yml
with:
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
lts: ${{ matrix.lts }}
build_type: release
run_tests: true
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
arch: [x86_64, aarch64]
lts: [false, true]
exclude:
- os: windows
arch: aarch64
- lts: true
arch: aarch64
publish:
name: Publish wheels to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing. It is also tied to the name of the workflow file, so do not change the file name without changing the OIDC config.
needs: build
steps:
- uses: actions/download-artifact@v8
with:
pattern: wheels-*
merge-multiple: true
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
on-failure:
name: Send Slack notification on failure
runs-on: ubuntu-latest
needs: [build, publish]
if: ${{ failure() }}
steps:
- uses: slackapi/slack-github-action@v3.0.1
if: ${{ env.SLACK_WEBHOOK_URL }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":rotating_light: Release: Uploading Wheels <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow> *FAILED* :rotating_light:"
}
}
]
}
webhook: ${{ env.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook