We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a3136d commit 7345dbaCopy full SHA for 7345dba
1 file changed
.github/workflows/publish.yml
@@ -1,4 +1,7 @@
1
-on: [push, pull_request]
+on:
2
+ push:
3
+ tags:
4
+ - '*.*.*'
5
6
jobs:
7
publish:
@@ -11,9 +14,10 @@ jobs:
11
14
if: startsWith(github.ref, 'refs/tags')
12
15
run: |
13
16
# from refs/tags/1.2.3 get 1.2.3
- VERSION=$(echo $GITHUB_REF | sed 's#.*/##')
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
0 commit comments