-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (61 loc) · 1.82 KB
/
package-release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
tags:
- '*'
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-20.04, macos-latest ]
include:
- os: windows-latest
artifact_name: cityjson2ifc-win
- os: ubuntu-latest
artifact_name: cityjson2ifc-ubuntu
- os: macos-latest
artifact_name: cityjson2ifc-macos
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest tox pyinstaller
- if: runner.os == 'Windows'
run: |
git config --system core.longpaths true
- name: Test with tox
run: |
tox
- name: Pyinstaller package
run: |
pip install .
pyinstaller --name cityjson2ifc --onefile --collect-all ifcopenshell src/cityjson2ifc_cli/cli.py
- if: runner.os == 'Linux'
run: |
zip -rj dist/cityjson2ifc-ubuntu.zip dist/cityjson2ifc
rm dist/cityjson2ifc
- if: runner.os == 'macOS'
run: |
zip -rj dist/cityjson2ifc-macos.zip dist/cityjson2ifc
rm dist/cityjson2ifc
- name: List contents
run: |
ls dist
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GH_PAT }}
file: dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true