Skip to content

Commit 8a3136d

Browse files
committed
set version from tag
1 parent 36990dd commit 8a3136d

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ jobs:
77
steps:
88
- uses: actions/checkout@v2
99

10+
- name: Set version from tag
11+
if: startsWith(github.ref, 'refs/tags')
12+
run: |
13+
# from refs/tags/1.2.3 get 1.2.3
14+
VERSION=$(echo $GITHUB_REF | sed 's#.*/##')
15+
PLACEHOLDER='version="develop"'
16+
VERSION_FILE='setup.py'
17+
grep "$PLACEHOLDER" "$VERSION_FILE"
18+
sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/" "$VERSION_FILE"
19+
shell: bash
20+
1021
- name: install dependencies & build
1122
run: |
1223
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)