1+ name : Build for Release
2+
3+ on :
4+ push :
5+ branches : [ master]
6+ pull_request :
7+ branches : [ master]
8+ release :
9+ types : [created]
10+ branches :
11+ - master
12+ - develop
13+ - release
14+ jobs :
15+ build_and_deploy_binaries :
16+
17+ name : Building Binaries for Release
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v3
21+
22+ build_and_deploy_python :
23+ name : Building Python Bindings for Release
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v4
27+
28+ - name : Set up Python 3.8
29+ uses : actions/setup-python@v2
30+ with :
31+ python-version : 3.8
32+
33+ - name : Install dependencies
34+ run : |
35+ python -m pip install --upgrade pip
36+ pip install wheel
37+ pip install cmake
38+ - name : Build and all versions using cibuidwheel
39+ run : |
40+ python -m build --sdist
41+ python -m pip install cibuildwheel
42+ cibuildwheel --output-dir wheelhouse
43+ - name : Upload Python Package to PyPI
44+ uses : pypa/gh-action-pypi-publish@master
45+ with :
46+ user : __token__
47+ password : ${{ secrets.PYPI_API_TOKEN }}
48+ packages : wheelhouse/*.whl
49+ repository_url : https://upload.pypi.org/legacy/
50+ skip_existing : true
51+
52+ build_swmm_docs :
53+ name : Building and Deploying WMM Docs
54+ runs-on : ubuntu-latest
55+ steps :
56+ - name : Deploy to GitHub Pages
57+ uses : peaceiris/actions-gh-pages@v3
58+ with :
59+ github_token : ${{ secrets.GITHUB_TOKEN }}
60+ publish_dir : ./docs
61+ publish_branch : gh-pages
62+ cname : swmm5-python.readthedocs.io
63+ commit_message : ${{ github.event.head_commit.message }}
64+ user_name : ${{ github.event.head_commit.author.name }}
65+ user_email : ${{ github.event.head_commit.author.email }}
66+ allow_empty_commit : true
67+ keep_files : true
68+ clean : true
69+ force_orphan : true
70+ enable_jekyll : true
71+ jekyll_build_opts : --config _config.yml,_config_dev.yml
72+ enable_cache : true
73+ cache_ignore : ' node_modules'
74+
75+ build_and_deploy_python_docs :
76+ name : Building and Deploying Python Docs
77+ depends-on : [build_python]
78+ runs-on : ubuntu-latest
79+ steps :
80+ - name : Deploy to GitHub Pages
81+ uses : peaceiris/actions-gh-pages@v3
82+ with :
83+ github_token : ${{ secrets.GITHUB_TOKEN }}
84+ publish_dir : ./docs
85+ publish_branch : gh-pages
86+ cname : swmm5-python.readthedocs.io
87+ commit_message : ${{ github.event.head_commit.message }}
88+ user_name : ${{ github.event.head_commit.author.name }}
89+ user_email : ${{ github.event.head_commit.author.email }}
90+ allow_empty_commit : true
91+ keep_files : true
92+ clean : true
93+ force_orphan : true
94+ enable_jekyll : true
95+ jekyll_build_opts : --config _config.yml,_config_dev.yml
96+ enable_cache : true
97+ cache_ignore : ' node_modules
0 commit comments