-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (50 loc) · 1.38 KB
/
wheels.yml
File metadata and controls
56 lines (50 loc) · 1.38 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
name: Build and test wheels
on:
push:
branches:
- main
- test-publish
tags:
- '*'
release:
types: [published]
jobs:
build-distribution-artifacts:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
with:
submodules: true
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
version: "0.8.15"
- name: Build artifacts
# working-directory: ${{ inputs.pyproject-directory }}
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4.6.1
with:
path: dist
publish:
runs-on: ubuntu-24.04
environment: release
needs: [ 'build-distribution-artifacts' ]
permissions:
id-token: write
steps:
- name: Download all
uses: actions/download-artifact@v4.2.0
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && github.branch_name == 'test-publish')
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PRODUCTION PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0