Skip to content

Commit 5d7fe12

Browse files
author
cloud-java-bot
committed
give bot access to write
1 parent 2db4ba9 commit 5d7fe12

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

.github/workflows/prepare-release.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ on:
1111
required: true
1212
default: (for example, 0.1.0)
1313

14+
permissions:
15+
actions:write
16+
1417
jobs:
1518
release:
1619
name: Prepare Jib release
1720
runs-on: ubuntu-latest
1821
steps:
1922
- name: Check out code
2023
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0
2324
- name: Set up JDK 8
2425
uses: actions/setup-java@v3
2526
with:
@@ -45,16 +46,6 @@ jobs:
4546
# TODO: run integration test? (Requries auth with GCP.)
4647
./gradlew clean build --stacktrace
4748
48-
- name: Create and push tag
49-
run: |
50-
git config user.email ${{ github.actor }}@users.noreply.github.com
51-
git config user.name ${{ github.actor }}
52-
TAG_NAME="v$(date +'%Y%m%d-%H%M%S')" # Example: v20231027-153000
53-
git tag "$TAG_NAME"
54-
git push origin "$TAG_NAME"
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.JIB_RELEASE_SECRET }} # Use GitHub's built-in token
57-
5849
- name: Run Gradle release
5950
run: |
6051
git checkout -b ${{ github.event.inputs.project }}-release-v${{ github.event.inputs.release_version }}
@@ -73,8 +64,6 @@ jobs:
7364
./gradlew "${PROJECT}":release \
7465
-Prelease.useAutomaticVersion=true \
7566
-Prelease.releaseVersion=${{ github.event.inputs.release_version }}
76-
env:
77-
GITHUB_TOKEN: ${{ secrets.JIB_RELEASE_SECRET }}
7867
7968
- name: Create pull request
8069
uses: repo-sync/[email protected]

0 commit comments

Comments
 (0)