diff --git a/.github/.release_notes_allowed_labels_list b/.github/.release_notes_allowed_labels_list new file mode 100644 index 0000000000..623f5ef47f --- /dev/null +++ b/.github/.release_notes_allowed_labels_list @@ -0,0 +1 @@ +Breaking Changes,New,Fixed,Improved,Changed,Removed,Deprecated diff --git a/.github/workflows/generate_release_notes.yml b/.github/workflows/generate_release_notes.yml new file mode 100644 index 0000000000..e7693370f3 --- /dev/null +++ b/.github/workflows/generate_release_notes.yml @@ -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" diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index d6f8be8457..35f03b2be1 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -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