Skip to content

Commit 11fe4c4

Browse files
committed
Managing workflows
1 parent d6df03e commit 11fe4c4

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ name: Build
22

33
on:
44
push:
5-
#branches:
6-
#- main
5+
branches:
6+
- deploy-pypi-test
7+
- deploy-pypi
78
# Release branches
89
#- "[0-9]+.[0-9]+.X"
9-
10-
tags:
11-
- '*'
12-
10+
1311
# Manual run
1412
workflow_dispatch:
1513

@@ -201,6 +199,8 @@ jobs:
201199
name: Upload to PyPI test
202200
needs: [build_universal_wheel, build_wheels_win_32, build_wheels_win_64, build_wheels_manylinux, build_wheels_macos, build_wheels_macos_arm]
203201
runs-on: ubuntu-latest
202+
# upload to PyPI test only for pushes to 'deploy-pypi-test'
203+
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi-test'
204204
steps:
205205
- uses: actions/download-artifact@v2
206206
with:
@@ -218,8 +218,8 @@ jobs:
218218
name: Upload to PyPI
219219
needs: [build_universal_wheel, build_wheels_win_32, build_wheels_win_64, build_wheels_manylinux, build_wheels_macos, build_wheels_macos_arm]
220220
runs-on: ubuntu-latest
221-
# upload to PyPI test on every tag starting with 'v'
222-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
221+
# upload to PyPI only for pushes to 'deploy-pypi'
222+
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi'
223223
steps:
224224
- uses: actions/download-artifact@v2
225225
with:
@@ -230,4 +230,4 @@ jobs:
230230
uses: pypa/gh-action-pypi-publish@master
231231
with:
232232
user: ${{ secrets.pypi_username }}
233-
password: ${{ secrets.pypi_password }}
233+
password: ${{ secrets.pypi_password }}

.github/workflows/sphinx-build.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Docs
2+
23
on:
34
# Manual run
45
workflow_dispatch:
6+
57
permissions:
68
contents: write
9+
710
jobs:
811
docs:
912
runs-on: windows-latest
@@ -22,7 +25,7 @@ jobs:
2225
dir
2326
- name: Deploy
2427
uses: peaceiris/actions-gh-pages@v3
25-
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
28+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
2629
with:
2730
publish_branch: gh-pages
2831
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Tests
22

33
on:
44
push:
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313

1414
jobs:
15-
test_package:
15+
test_import_package:
1616
name: Testing package on ${{ matrix.config.name }} for Python ${{ matrix.python }}
1717
runs-on: ${{ matrix.config.os }}
1818
strategy:
@@ -36,7 +36,7 @@ jobs:
3636
python -m pip install setuptools --upgrade
3737
python -m pip install wheel --upgrade
3838
python setup.py install
39-
39+
4040
- name: Import package
4141
run: |
4242
python -c "import delphifmx"

0 commit comments

Comments
 (0)