File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1- name : CI/CD
1+ name : build
22
33on :
44 push :
55 branches :
66 - main
7- - ' **'
8- pull_request :
9- branches :
10- - main
7+ - " **"
118
129jobs :
1310 test :
3734 publish :
3835 needs : test
3936 runs-on : ubuntu-latest
40- if : github.event_name == 'push'
4137 permissions :
4238 id-token : write
4339 steps :
5955 - name : Update version for staging (non-main branches)
6056 if : github.ref != 'refs/heads/main'
6157 run : |
62- COMMIT_HASH =$(git rev-parse --short HEAD )
58+ TIMESTAMP =$(date +%Y%m%d%H%M%S )
6359 CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
64- NEW_VERSION="${CURRENT_VERSION}.dev${COMMIT_HASH }"
60+ NEW_VERSION="${CURRENT_VERSION}.dev${TIMESTAMP }"
6561 sed -i "s/^version = .*/version = \"${NEW_VERSION}\"/" pyproject.toml
6662 echo "Publishing version ${NEW_VERSION} to Test PyPI"
6763
You can’t perform that action at this time.
0 commit comments