forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (53 loc) · 1.45 KB
/
build_compiled.yml
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
name: Build compiled package
on:
workflow_dispatch:
push:
branches:
- 'compiled-3.11'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.builds.os }}
strategy:
fail-fast: false
matrix:
builds: [
{os: "macos-latest"},
{os: "windows-latest"},
{os: "ubuntu-latest"}
]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install deps
run: python -m pip install mypy[mypyc] wheel twine
- name: Build wheels
run: python build.py package
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: builds-${{ matrix.builds.os }}
path: ./build/dist/*
- name: Create GH release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
${{ steps.bin.outputs.BIN_PATH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish on PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload --skip-existing ./build/dist/*