Skip to content

Commit

Permalink
Add Generate release notes job
Browse files Browse the repository at this point in the history
COAND-1016
  • Loading branch information
araratthehero committed Nov 12, 2024
1 parent 17af293 commit d1b0207
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/.release_notes_allowed_labels_list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Breaking Changes,New,Fixed,Improved,Changed,Removed,Deprecated
45 changes: 45 additions & 0 deletions .github/workflows/generate_release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Generate release notes

# Start this workflow when a release branch is created
on:
workflow_call:

jobs:
get_allowed_labels:
runs-on: ubuntu-latest

outputs:
allowed_labels: ${{ steps.get_allowed_labels.outputs.ALLOWED_LABELS }}

steps:
- uses: actions/checkout@v4

- name: Get the list of allowed pull request labels
id: get_allowed_labels
run: |
RED='\033[0;31m'
FILE_NAME=.release_notes_allowed_labels_list
GITHUB_DIR=.github
FILE_PATH=$PROJECT_ROOT/$GITHUB_DIR/$FILE_NAME
if [[ ! -f "$FILE_PATH" ]]; then
echo -e "${RED}$FILE_NAME file doesn't exits in $GITHUB_DIR/"
exit 1
fi
ALLOWED_LABELS=$(cat $FILE_PATH)
echo "allowed_labels=$ALLOWED_LABELS" >> $GITHUB_OUTPUT
echo $ALLOWED_LABELS
env:
PROJECT_ROOT: ${{ github.workspace }}

generate_release_notes:
runs-on: ubuntu-latest
needs: get_allowed_labels

steps:
- uses: actions/checkout@v4

- name: Generate release notes
env:
ALLOWED_LABELS: ${{ needs.get_allowed_labels.outputs.allowed_labels }}
run: |
echo "Hello"
23 changes: 3 additions & 20 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ on:
workflow_dispatch:

jobs:
check:
name: Check
uses: ./.github/workflows/check.yml
generate_version_name:
name: Generate version name
uses: ./.github/workflows/generate_version_name.yml
publish_to_maven_central:
name: Publish to Maven Central
uses: ./.github/workflows/publish_to_maven_central.yml
secrets: inherit
needs: [generate_version_name, check]
with:
version-name: ${{ needs.generate_version_name.outputs.version-name }}
create_github_release:
name: Create GitHub Release
uses: ./.github/workflows/create_github_release.yml
secrets: inherit
needs: [generate_version_name, publish_to_maven_central]
with:
version-name: ${{ needs.generate_version_name.outputs.version-name }}
generate_release_notes:
name: Generate release notes
uses: ./.github/workflows/generate_release_notes.yml

0 comments on commit d1b0207

Please sign in to comment.