From 2ac432e91d0bad405aca6b699366c1f494063045 Mon Sep 17 00:00:00 2001 From: kiendnt Date: Tue, 24 Feb 2026 11:23:38 +0700 Subject: [PATCH 1/3] add generate doc --- .github/workflows/dispatch-release.yml | 30 +++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-release.yml b/.github/workflows/dispatch-release.yml index ccd99e0..5723de7 100644 --- a/.github/workflows/dispatch-release.yml +++ b/.github/workflows/dispatch-release.yml @@ -23,4 +23,32 @@ jobs: with: tag_name: ${{ github.event.client_payload.release_tag }} body: ${{ github.event.client_payload.release_body }} - target_commitish: 'main' \ No newline at end of file + target_commitish: 'main' + + generate-doc: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Generate MDX file + run: | + DIR="src/app/blog/(post)/v${{ github.event.release.tag_name }}" + mkdir -p "$DIR" + + cat < "$DIR/page.mdx" + ${{ github.event.release.body }} + EOF + + - name: Commit & Push + run: | + TAG=v${{ github.event.release.tag_name }} + git config user.email "quynh.nguyen@df.technology" + git config user.name "Quynh-Nguyen" + git checkout -b release/${TAG} + git add . + git commit--allow-empty -m "docs: add release ${TAG}" + git push \ No newline at end of file From 13965fbd38f469f6a7f75604216f5d28a5926a80 Mon Sep 17 00:00:00 2001 From: kiendnt Date: Tue, 24 Feb 2026 16:22:15 +0700 Subject: [PATCH 2/3] feat:generate doc --- .github/workflows/dispatch-release.yml | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dispatch-release.yml b/.github/workflows/dispatch-release.yml index 5723de7..ef22801 100644 --- a/.github/workflows/dispatch-release.yml +++ b/.github/workflows/dispatch-release.yml @@ -26,29 +26,36 @@ jobs: target_commitish: 'main' generate-doc: + needs: create-release runs-on: ubuntu-latest permissions: contents: write + pull-requests: write steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Generate MDX file run: | - DIR="src/app/blog/(post)/v${{ github.event.release.tag_name }}" + DIR="src/app/blog/(post)/v${{ github.event.client_payload.release_tag }}" mkdir -p "$DIR" cat < "$DIR/page.mdx" - ${{ github.event.release.body }} + ${{ github.event.client_payload.release_body }} EOF - - name: Commit & Push - run: | - TAG=v${{ github.event.release.tag_name }} - git config user.email "quynh.nguyen@df.technology" - git config user.name "Quynh-Nguyen" - git checkout -b release/${TAG} - git add . - git commit--allow-empty -m "docs: add release ${TAG}" - git push \ No newline at end of file + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + env: + TAG: "${{ github.event.client_payload.release_tag }}" + + with: + commit-message: Added release note for release ${{ env.TAG }} version + title: 'Publish the release note for release ${{ env.TAG }} version' + body: "Added release note for release ${{ env.TAG }} version" + branch: release/v${{ env.TAG }} + base: main + labels: pending-review \ No newline at end of file From 281492d40a8480da3093c458a98506e6da6da386 Mon Sep 17 00:00:00 2001 From: Quynh-Nguyen Date: Tue, 24 Feb 2026 09:28:48 +0000 Subject: [PATCH 3/3] Trigger Build