Skip to content

Commit

Permalink
Merge branch 'publish'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Hebrank committed Jan 18, 2023
2 parents e2a0fa9 + 7345dba commit f84d7db
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
on: [push, pull_request]
on:
push:
tags:
- '*.*.*'

jobs:
publish:
Expand All @@ -7,6 +10,18 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set version from tag
if: startsWith(github.ref, 'refs/tags')
run: |
# from refs/tags/1.2.3 get 1.2.3
VERSION=$( basename $GITHUB_REF )
PLACEHOLDER='version="develop"'
VERSION_FILE='setup.py'
# fail out if placeholder not found
grep "$PLACEHOLDER" "$VERSION_FILE"
sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/" "$VERSION_FILE"
shell: bash

- name: install dependencies & build
run: |
pip3 install setuptools wheel
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It will optionally verify that the POST request originated from a particular IP
### Installation

```bash
pip install .
pip install gwh
```

### Repository Configuration
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

setup(
name="gwh",
version="develop",
author='Andy Hebrank',
author_email='[email protected]',
packages=['gwh'],
Expand Down

0 comments on commit f84d7db

Please sign in to comment.