Skip to content

Commit f0a183c

Browse files
authored
Merge pull request #35 from astro-informatics/ci/incorrect_conditional
deployment to bintray and pypi via git tags
2 parents dfbdb63 + 5c777ee commit f0a183c

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010

1111
jobs:
1212
build:
13+
name: CMake build on ${{ matrix.os }}
1314
runs-on: ${{ matrix.os }}
1415
strategy:
1516
fail-fast: false

.github/workflows/conan.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
pull_request:
1010

1111
jobs:
12-
testing:
12+
conan:
13+
name: conan packaging and publication on ${{ matrix.os }}
1314
runs-on: ${{ matrix.os }}
1415
strategy:
1516
fail-fast: false
@@ -44,7 +45,7 @@ jobs:
4445
-s build_type=${{matrix.build_type}} \
4546
4647
- name: upload to bintray
47-
if: github.ref_type == 'tag'
48+
if: ${{ startsWith(github.ref, 'refs/tags') }}
4849
shell: bash
4950
env:
5051
CONAN_PASSWORD: ${{secrets.BINTRAY_TOKEN}}

.github/workflows/python.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ name: Python Build
1010

1111
jobs:
1212
development-mode:
13+
name: pip development mode on ${{ matrix.os }}
1314
runs-on: ${{ matrix.os }}
1415
strategy:
1516
fail-fast: false
1617
matrix:
17-
os: [ubuntu-latest, macos-latest]
18+
os: [macos-latest]
1819
python-version: [3.8]
1920

2021
steps:
@@ -36,7 +37,7 @@ jobs:
3637
run: pytest tests/test_pyssht.py
3738

3839
from-sdist:
39-
name: Build source distribution
40+
name: python source distribution
4041
runs-on: ubuntu-latest
4142
steps:
4243
- uses: actions/checkout@v2
@@ -60,7 +61,7 @@ jobs:
6061
run: pytest tests/test_pyssht.py
6162

6263
- uses: actions/upload-artifact@v2
63-
if: github.ref_type == 'tag'
64+
if: ${{ startsWith(github.ref, 'refs/tags') }}
6465
with:
6566
path: ./dist/*.tar.gz
6667
name: source-distribution
@@ -98,13 +99,14 @@ jobs:
9899
run: pytest tests
99100

100101
- uses: actions/upload-artifact@v2
101-
if: github.ref_type == 'tag'
102+
if: ${{ startsWith(github.ref, 'refs/tags') }}
102103
with:
103104
path: ./dist/*.whl
104105
name: wheel-${{matrix.os}}-${{matrix.python-version}}
105106

106107
publication:
107-
if: github.ref_type == 'tag'
108+
name: publish to pypi
109+
if: ${{ startsWith(github.ref, 'refs/tags') }}
108110
runs-on: ubuntu-latest
109111
needs: [build_wheels, from-sdist]
110112
steps:
@@ -117,14 +119,14 @@ jobs:
117119
mv source-distribution/*.tar.gz wheel-*/*.whl dist
118120
119121
- name: Publish distribution 📦 to Test PyPI
120-
if: github.ref != 'refs/tags/v1.3.2'
122+
if: ${{ github.ref != 'refs/tags/v1.3.2' }}
121123
uses: pypa/gh-action-pypi-publish@master
122124
with:
123125
password: ${{ secrets.TEST_PYPI_TOKEN }}
124126
repository_url: https://test.pypi.org/legacy/
125127

126128
- name: Publish distribution 📦 to PyPI
127-
if: github.ref == 'refs/tags/v1.3.2'
129+
if: ${{ github.ref == 'refs/tags/v1.3.2' }}
128130
uses: pypa/gh-action-pypi-publish@master
129131
with:
130132
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)