提交 74d93758 编写于 作者: HansBug's avatar HansBug 😆

release(hansbug): fix the release problem && use matrix.os instead of runner.os

上级 5bde72c6
......@@ -6,7 +6,7 @@ on:
jobs:
source_release:
name: Publish source package to official pypi
name: Build and publish the source package
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'opendilab/treevalue' }}
strategy:
......@@ -41,17 +41,18 @@ jobs:
with:
password: ${{ secrets.PYPI_PASSWORD }}
verbose: true
skip_existing: true
- name: Upload distribution 📦 to github release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
tag: ${{ github.ref }}
overwrite: false
file_glob: true
wheel_release:
name: Try build the wheels
wheel_build:
name: Build the wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
......@@ -114,6 +115,71 @@ jobs:
CIBW_ARCHS: ${{ matrix.architecture }}
CIBW_PROJECT_REQUIRES_PYTHON: ~=${{ matrix.python }}.0
- name: Show the buildings
shell: bash
run: |
ls -al ./wheelhouse
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts-${{ matrix.os }}-cp${{ matrix.python }}-${{ matrix.architecture }}
path: ./wheelhouse
# the publishing can only be processed on linux system
wheel_publish:
name: Publish the wheels to pypi
runs-on: ubuntu-18.04
needs:
- wheel_build
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-18.04'
- 'windows-2019'
- 'macos-10.15'
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
architecture:
- x86_64
- arm64
- aarch64
- x86
- AMD64
exclude:
- os: ubuntu-18.04
architecture: arm64
- os: ubuntu-18.04
architecture: x86
- os: ubuntu-18.04
architecture: AMD64
- os: windows-2019
architecture: x86_64
- os: windows-2019
architecture: arm64
- os: windows-2019
architecture: aarch64
- os: macos-10.15
architecture: aarch64
- os: macos-10.15
architecture: x86
- os: macos-10.15
architecture: AMD64
- python: '3.6'
architecture: arm64
- python: '3.7'
architecture: arm64
steps:
- name: Download packed files to artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts-${{ matrix.os }}-cp${{ matrix.python }}-${{ matrix.architecture }}
path: ./wheelhouse
- name: Show the buildings
shell: bash
run: |
......@@ -123,6 +189,7 @@ jobs:
with:
password: ${{ secrets.PYPI_PASSWORD }}
verbose: true
skip_existing: true
packages_dir: wheelhouse/
- name: Upload distribution 📦 to github release
uses: svenstaro/upload-release-action@v2
......@@ -130,4 +197,5 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: wheelhouse/*
tag: ${{ github.ref }}
overwrite: false
file_glob: true
......@@ -110,7 +110,7 @@ jobs:
run: |
ls -al ./wheelhouse
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifacts-${{ runner.os }}-cp${{ matrix.python }}-${{ matrix.architecture }}
path: ./wheelhouse/*
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册