Skip to content

Commit f84d7db

Browse files
committed
Merge branch 'publish'
2 parents e2a0fa9 + 7345dba commit f84d7db

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
on: [push, pull_request]
1+
on:
2+
push:
3+
tags:
4+
- '*.*.*'
25

36
jobs:
47
publish:
@@ -7,6 +10,18 @@ jobs:
710
steps:
811
- uses: actions/checkout@v2
912

13+
- name: Set version from tag
14+
if: startsWith(github.ref, 'refs/tags')
15+
run: |
16+
# from refs/tags/1.2.3 get 1.2.3
17+
VERSION=$( basename $GITHUB_REF )
18+
PLACEHOLDER='version="develop"'
19+
VERSION_FILE='setup.py'
20+
# fail out if placeholder not found
21+
grep "$PLACEHOLDER" "$VERSION_FILE"
22+
sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/" "$VERSION_FILE"
23+
shell: bash
24+
1025
- name: install dependencies & build
1126
run: |
1227
pip3 install setuptools wheel

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ It will optionally verify that the POST request originated from a particular IP
99
### Installation
1010

1111
```bash
12-
pip install .
12+
pip install gwh
1313
```
1414

1515
### Repository Configuration

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
setup(
55
name="gwh",
6+
version="develop",
67
author='Andy Hebrank',
78
author_email='ahebrank@gmail.com',
89
packages=['gwh'],

0 commit comments

Comments
 (0)