Skip to content

Commit a09ad24

Browse files
committed
Merge branch 'master' of github.com:sgoodm/python-distance-rasters
2 parents 14e30d8 + a3e4c4a commit a09ad24

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ jobs:
99
runs-on: ubuntu-latest
1010
env:
1111
VERSION: null
12-
VERSION_BUMPED: false
1312

1413
steps:
1514
- uses: actions/checkout@v2
16-
with:
17-
fetch-depth: 2
1815
- name: Set up Python 🐍
1916
uses: actions/setup-python@v2
2017
with:
@@ -23,27 +20,23 @@ jobs:
2320
run: |
2421
python -m pip install --upgrade pip
2522
pip install build
26-
- name: Get version #️⃣
23+
- name: Get version
2724
run: |
2825
cat setup.cfg | grep "version = " | awk '{print "VERSION="$(NF)}' >> $GITHUB_ENV
2926
- name: Build a binary wheel and a source tarball 🚧
30-
run: |
31-
python -m build --sdist --wheel --outdir dist/ .
27+
run: python -m build --sdist --wheel --outdir dist/ .
3228
- name: Validate release tag
3329
run: |
34-
if [ "${GITHUB_REF#refs/*/}" != "$VERSION" ]; then exit 1; fi
30+
if [ "${GITHUB_REF#refs/tags/}" != "${VERSION}" ]; then exit 1; fi
3531
- name: Publish to Test PyPI 📦
36-
if: |
37-
env.VERSION_BUMPED == true &&
38-
contains(env.VERSION, 'a')
32+
if: contains(env.VERSION, 'a')
3933
uses: pypa/gh-action-pypi-publish@v1.4.2
4034
with:
4135
user: __token__
4236
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
4337
repository_url: https://test.pypi.org/legacy/
4438
- name: Publish to PyPI 📦
4539
if: |
46-
env.VERSION_BUMPED == true &&
4740
!contains(env.VERSION, 'a')
4841
uses: pypa/gh-action-pypi-publish@v1.4.2
4942
with:

0 commit comments

Comments
 (0)