-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (49 loc) · 1.37 KB
/
wheels.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
name: wheels
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
build_macos:
name: "macos build: ${{ matrix.arch }}"
runs-on: macos-latest
needs: create_release # we need to know the upload URL
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: venv
run: |
python3 -m venv .venv
.venv/bin/pip3 install --upgrade pip
- name: build
id: macos_wheel
run: |
.venv/bin/pip3 wheel .
echo "wheel=$(ls *.whl)" > ${GITHUB_OUTPUT}
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ steps.macos_wheel.outputs.wheel }}
asset_name: ${{ steps.macos_wheel.outputs.wheel }}
asset_content_type: application/octet-stream