Skip to content

Commit 2edf25a

Browse files
committed
[CI] Add git user/email info in temp release-adhoc.yml
1 parent af98511 commit 2edf25a

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

.github/workflows/release-adhoc.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,39 +57,11 @@ jobs:
5757
with:
5858
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
5959
- uses: spring-io/spring-gradle-build-action@v2
60-
- name: Changelog Config File
61-
run: |
62-
repositoryTeam=$(gh api repos/$GITHUB_REPOSITORY/collaborators --jq 'map(select(.role_name == "admin") | .login) | tostring')
63-
repositoryTeam=$(sed 's/"//g' <<< ${repositoryTeam:1:-1})
64-
repositoryVisibility=$(gh repo view --json visibility --jq .[])
65-
repositoryVisibility=$([[ $repositoryVisibility = 'PUBLIC' ]] && echo 'true' || echo 'false')
66-
echo "changelog.contributors.exclude.names=$repositoryTeam" > changelog.properties
67-
echo "changelog.issues.generate-links=$repositoryVisibility" >> changelog.properties
68-
- name: Generate Changelog
69-
uses: spring-io/[email protected]
70-
with:
71-
milestone: ${{ env.VERSION }}
72-
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
73-
config-file: changelog.properties
74-
- name: GitHub Release
75-
run: |
76-
RELEASE_URL=$(gh release create v${{ env.VERSION }} -F changelog.md ${{ (contains(env.VERSION, '-M') || contains(env.VERSION, '-RC')) && '--prerelease' || '' }})
77-
echo "::notice title=Release Page::$RELEASE_URL"
78-
- name: Close Milestone
79-
run: |
80-
MILESTONE_ID=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq '.[] | select(.title == "${{ env.VERSION }}") | .number')
81-
if [ $MILESTONE_ID ]; then
82-
gh api -X PATCH repos/$GITHUB_REPOSITORY/milestones/$MILESTONE_ID -f state='closed' --silent
83-
fi
84-
- name: Announce Release in Chat
85-
if: env.GCHAT_WEBHOOK_URL
86-
run: |
87-
curl -X POST '${{ env.GCHAT_WEBHOOK_URL }}' \
88-
-H 'Content-Type: application/json' \
89-
-d '{ text: "${{ github.event.repository.name }}-announcing `${{ env.VERSION }}`"}'
9060
- name: Update next snapshot version
9161
run: |
9262
echo "Updating $REPO@$VERSION to next snapshot version."
9363
./gradlew :updateToSnapshotVersion
64+
git config user.name 'github-actions[bot]'
65+
git config user.email 'github-actions[bot]@users.noreply.github.com'
9466
git commit -am "[Release $VERSION] Next development version"
9567
git push

0 commit comments

Comments
 (0)