浏览代码

Merge pull request #240 from legoktm/macos-wheels

Use Github Actions to build macOS wheels too
tags/v0.6
Ben Kurtovic 4 年前
committed by GitHub
父节点
当前提交
8c4b5928eb
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 33 次插入0 次删除
  1. +33
    -0
      .github/workflows/build-macos-wheels.yml

+ 33
- 0
.github/workflows/build-macos-wheels.yml 查看文件

@@ -0,0 +1,33 @@
name: Build macOS wheels

on: [push]

jobs:
build:

runs-on: macos-latest
strategy:
matrix:
# macOS apparently doesn't support 3.4
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
run: |
python -m pip install --upgrade pip wheel setuptools
pip wheel . -w dist/
ls dist/
- name: Publish package to PyPI
# Only actually publish if a new tag was pushed
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
# We can't use the pypa action because of https://github.com/pypa/gh-action-pypi-publish/issues/15
run: |
pip install twine
TWINE_USERNAME="__token__" \
TWINE_PASSWORD="${{ secrets.pypi_password }}" \
twine upload dist/*

正在加载...
取消
保存