Skip to content

Commit 30017b1

Browse files
committed
fixup workflow
1 parent 79b0231 commit 30017b1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
name: CI/CD
1+
name: build
22

33
on:
44
push:
55
branches:
66
- main
7-
- '**'
8-
pull_request:
9-
branches:
10-
- main
7+
- "**"
118

129
jobs:
1310
test:
@@ -37,7 +34,6 @@ jobs:
3734
publish:
3835
needs: test
3936
runs-on: ubuntu-latest
40-
if: github.event_name == 'push'
4137
permissions:
4238
id-token: write
4339
steps:
@@ -59,9 +55,9 @@ jobs:
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

0 commit comments

Comments
 (0)