mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Add optimistic Github action to upload wheels to PyPi
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
name: Publish-ifcopenshell-multiplatform
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/ci-ifcopenshell-pypi.yml'
|
||||||
|
- 'src/ifcopenshell-python/ifcopenshell/**'
|
||||||
|
branches:
|
||||||
|
- v0.7.0
|
||||||
|
|
||||||
|
env:
|
||||||
|
major: 0
|
||||||
|
minor: 0
|
||||||
|
name: ifcopenshell
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
activate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
github.repository == 'IfcOpenShell/IfcOpenShell'
|
||||||
|
steps:
|
||||||
|
- name: Set env
|
||||||
|
run: echo ok go
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: activate
|
||||||
|
name: ${{ matrix.config.name }}-${{ matrix.pyver }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
pyver: [py36, py37, py38, py39, py310]
|
||||||
|
config:
|
||||||
|
- {
|
||||||
|
name: "Windows Build",
|
||||||
|
short_name: win,
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Linux Build",
|
||||||
|
short_name: linux
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "MacOS Build",
|
||||||
|
short_name: macos
|
||||||
|
}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
|
||||||
|
with:
|
||||||
|
python-version: '3.7.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||||
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
|
- run: echo ${{ env.DATE }}
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%y%m%d')"
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
pip install build
|
||||||
|
cp -r src/ifcopenshell-python src/ifcopenshell-python_${{ matrix.config.short_name }}_${{ matrix.pyver }} &&
|
||||||
|
cd src/ifcopenshell-python_${{ matrix.config.short_name }}_${{ matrix.pyver }} &&
|
||||||
|
make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }}
|
||||||
|
- name: Publish a Python distribution to PyPI
|
||||||
|
uses: ortega2247/pypi-upload-action@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
packages_dir: src/ifcopenshell-python/dist
|
||||||
@@ -4,7 +4,6 @@ PLATFORM:=linux
|
|||||||
|
|
||||||
ifeq ($(PYVERSION), py36)
|
ifeq ($(PYVERSION), py36)
|
||||||
PYNUMBER:=36
|
PYNUMBER:=36
|
||||||
ABITAG:=cp36m
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(PYVERSION), py37)
|
ifeq ($(PYVERSION), py37)
|
||||||
PYNUMBER:=37
|
PYNUMBER:=37
|
||||||
|
|||||||
Reference in New Issue
Block a user