Skip to content

Commit 0168c0e

Browse files
committed
See #4529. Publish IfcPatch to PyPI.
1 parent 42db0b1 commit 0168c0e

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci-ifcpatch-pypi
2+
3+
on:
4+
schedule:
5+
# ┌───────────── minute (0 - 59)
6+
# │ ┌───────────── hour (0 - 23)
7+
# │ │ ┌───────────── day of the month (1 - 31)
8+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
9+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
10+
# * * * * *
11+
- cron: "0 0 18 * *"
12+
workflow_dispatch:
13+
14+
env:
15+
major: 0
16+
minor: 0
17+
name: ifcopenshell
18+
19+
jobs:
20+
activate:
21+
runs-on: ubuntu-latest
22+
if: |
23+
github.repository == 'IfcOpenShell/IfcOpenShell'
24+
steps:
25+
- name: Set env
26+
run: echo ok go
27+
28+
build:
29+
needs: activate
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
36+
with:
37+
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
38+
- name: Compile
39+
run: |
40+
pip install build
41+
cd src/ifcpatch &&
42+
make dist
43+
- name: Publish a Python distribution to PyPI
44+
uses: ortega2247/pypi-upload-action@master
45+
with:
46+
user: __token__
47+
password: ${{ secrets.PYPI_API_TOKEN }}
48+
packages_dir: src/ifcpatch/dist

src/ifcpatch/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ test:
2323
.PHONY: qa
2424
qa:
2525
black .
26+
27+
.PHONY: dist
28+
dist:
29+
rm -rf dist
30+
$(SED) "s/999999/$(VERSION)/" pyproject.toml
31+
python -m build
32+
$(SED) "s/$(VERSION)/999999/" pyproject.toml

src/ifcpatch/pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ifcpatch"
7+
version = "0.0.999999"
8+
authors = [
9+
{ name="Dion Moult", email="dion@thinkmoult.com" },
10+
]
11+
description = "IFC patching utility"
12+
readme = "README.md"
13+
keywords = ["IFC", "IDS", "BIM"]
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
17+
]
18+
dependencies = [
19+
"ifcopenshell",
20+
]
21+
22+
[project.urls]
23+
Homepage = "http://ifcopenshell.org"
24+
Documentation = "https://docs.ifcopenshell.org"
25+
Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues"
26+
27+
[tool.setuptools.packages.find]
28+
include = ["ifcpatch"]
29+
exclude = ["test*"]

0 commit comments

Comments
 (0)