Skip to content

Commit

Permalink
Merge pull request #216 from trydofor/develop
Browse files Browse the repository at this point in the history
🚀 enhance release notes #215
  • Loading branch information
trydofor authored Mar 4, 2024
2 parents dd0bbc8 + 7f3a89d commit b4b27e9
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 2 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
on:
milestone:
types: [closed]
workflow_dispatch:
inputs:
milestoneId:
description: 'Id of Milestone'
type: number
required: true
default: 10

name: Milestone Release Notes
jobs:
create-release-notes:
runs-on: ubuntu-latest
env:
OUTPUT_FOLDER: temp_release_notes
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PAT: ${{ secrets.GH_PAT }}
steps:
- uses: actions/checkout@master

- name: Prepare Settings
id: settings
run: |
echo "# env and var" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
_user=${{ github.actor }}
echo "- ACTION_NAME=$_user" >> "$GITHUB_STEP_SUMMARY"
echo "ACTION_NAME=$_user" >> "$GITHUB_OUTPUT"
_mail=${{ format('{0}+{1}@users.noreply.github.com', github.actor_id, github.actor) }}
echo "- ACTION_MAIL=$_mail" >> "$GITHUB_STEP_SUMMARY"
echo "ACTION_MAIL=$_mail" >> "$GITHUB_OUTPUT"
_owner=${{ github.repository_owner }}
echo "- OWNER=$_owner" >> "$GITHUB_STEP_SUMMARY"
echo "OWNER=$_owner" >> "$GITHUB_OUTPUT"
_repo=$(basename ${{ github.repository }})
echo "- REPO_NAME=$_repo" >> "$GITHUB_STEP_SUMMARY"
echo "REPO_NAME=$_repo" >> "$GITHUB_OUTPUT"
_id=${{ inputs.milestoneId }}
if [ "$_id" == "" ]; then
_file=${{ github.event.milestone.title }}
else
_file=$(curl -s -H "Authorization: token $GH_PAT" https://api.github.com/repos/$_owner/$_repo/milestones/$_id | jq -r '.title')
fi
echo "- FILE_NAME=$_file" >> "$GITHUB_STEP_SUMMARY"
echo "FILE_NAME=$_file" >> "$GITHUB_OUTPUT"
# https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md
cat > .github/release-notes.yml << "EOF"
changelog:
issues:
exclude:
labels: [ "duplicate", "invalid", "investigate", "pending", "question", "wontfix" ]
sections:
- title: "⭐ New Feature"
labels: [ "feature" ]
- title: "🐞 Bug Fixes"
labels: [ "bug" ]
- title: "💎 Enhancement"
labels: [ "better", "devops", "quality" ]
- title: "📝 Documentation"
labels: [ "docs" ]
- title: "📦️ Dependency"
labels: [ "deps" ]
EOF
- name: Create Release Notes
uses: docker://decathlon/release-notes-generator-action:latest
env:
FILENAME_PREFIX: Milestone-
FILENAME: ${{ steps.settings.outputs.FILE_NAME }}

- name: Upload Release Notes to Wiki
uses: docker://decathlon/wiki-page-creator-action:latest
env:
ACTION_MAIL: ${{ steps.settings.outputs.ACTION_MAIL }}
ACTION_NAME: ${{ steps.settings.outputs.ACTION_NAME }}
MD_FOLDER: ${{ env.OUTPUT_FOLDER }}
OWNER: ${{ steps.settings.outputs.OWNER }}
REPO_NAME: ${{ steps.settings.outputs.REPO_NAME }}
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release-To-OssRh
name: Release to Maven Repo
run-name: Release ${{ github.ref_name }} by @${{ github.event_name }}

on:
Expand Down Expand Up @@ -194,6 +194,7 @@ jobs:
## maven deploy altrh
- name: Deploy ALT ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_DEPLOY_ALTRH == 'true'
continue-on-error: ${{ inputs.deployAltrh != 'true' }}
run: >
mvn
-P 'deploy,deploy-alt,!module-example,!module-devs'
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/warroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
workflow_dispatch:

name: Warroom for Actions

jobs:
create-release-notes:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Prepare Settings
id: settings
run: |
echo "# env and var" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
_user=${{ github.actor }}
echo "- ACTION_NAME=$_user" >> "$GITHUB_STEP_SUMMARY"
echo "ACTION_NAME=$_user" >> "$GITHUB_OUTPUT"
_mail=${{ format('{0}+{1}@users.noreply.github.com', github.actor_id, github.actor) }}
echo "- ACTION_MAIL=$_mail" >> "$GITHUB_STEP_SUMMARY"
echo "ACTION_MAIL=$_mail" >> "$GITHUB_OUTPUT"
_owner=${{ github.repository_owner }}
echo "- OWNER=$_owner" >> "$GITHUB_STEP_SUMMARY"
echo "OWNER=$_owner" >> "$GITHUB_OUTPUT"
_repo=$(basename ${{ github.repository }})
echo "- REPO_NAME=$_repo" >> "$GITHUB_STEP_SUMMARY"
echo "REPO_NAME=$_repo" >> "$GITHUB_OUTPUT"
echo "## workspace" >> "$GITHUB_STEP_SUMMARY"
ls -al >> "$GITHUB_STEP_SUMMARY"
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<properties>
<!-- https://maven.apache.org/maven-ci-friendly.html -->
<revision>3.2.110-SNAPSHOT</revision>
<revision>3.2.111-SNAPSHOT</revision>
<!-- https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html -->
<spring-boot.version>3.2.2</spring-boot.version>
<!-- -->
Expand Down

0 comments on commit b4b27e9

Please sign in to comment.