Skip to content

Commit e87e744

Browse files
author
cloud-java-bot
committed
testing pushing tag separately
1 parent 8edd7d7 commit e87e744

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/prepare-release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- name: Check out code
2020
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
2123
- name: Set up JDK 8
2224
uses: actions/setup-java@v3
2325
with:
@@ -42,6 +44,18 @@ jobs:
4244
run: |
4345
# TODO: run integration test? (Requries auth with GCP.)
4446
./gradlew clean build --stacktrace
47+
- name: Configure Git user
48+
run: |
49+
git config --global user.email "[email protected]"
50+
git config --global user.name "Your Bot Name"
51+
52+
- name: Create and push tag
53+
run: |
54+
TAG_NAME="v$(date +'%Y%m%d-%H%M%S')" # Example: v20231027-153000
55+
git tag "$TAG_NAME"
56+
git push origin "$TAG_NAME"
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use GitHub's built-in token
4559

4660
- name: Run Gradle release
4761
run: |

0 commit comments

Comments
 (0)