File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 45
45
46
46
- name : Publish a Python distribution to PyPI
47
47
uses : pypa/gh-action-pypi-publish@release/v1
48
+ if : startsWith(github.ref, 'refs/tags/')
48
49
with :
49
50
password : ${{ secrets.PYPI_API_TOKEN }}
50
51
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
number=" ${1:- " minor" } "
3
3
echo Updating $number
4
+
5
+ git fetch
6
+ git merge-base --is-ancestor origin/HEAD HEAD
7
+ if [ $? -ne 0 ]; then
8
+ echo " local branch is not up to date with origin" ;
9
+ exit 1
10
+ fi
11
+
4
12
if [ -n " $( git status --porcelain) " ]; then
5
13
echo " there are changes not committed" ;
6
14
exit 1
@@ -10,3 +18,4 @@ python -m hatch version $number
10
18
v=$( python -m hatch version)
11
19
git commit llama_api_server/__about__.py -m " Bump version to $v "
12
20
git tag v$v
21
+ git push origin HEAD --tags
You can’t perform that action at this time.
0 commit comments