From c44b7f64fbae1dd0504a8c16a0efb7841715c95c Mon Sep 17 00:00:00 2001 From: Serg Date: Thu, 23 Oct 2025 20:26:15 +0700 Subject: [PATCH 1/7] feat: imp custom release draft workflow --- .github/workflows/custom-release-draft.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/custom-release-draft.yml diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml new file mode 100644 index 000000000..9c018e9da --- /dev/null +++ b/.github/workflows/custom-release-draft.yml @@ -0,0 +1,11 @@ +name: Draft Release + +on: + push: + branches: + - develop + - feat/release-drafter + +jobs: + call-release: + uses: Adamant-im/.github/.github/workflows/custom-release-draft.yml@master From 4f923eb29748f9caa9cfe57600d291279a0c1628 Mon Sep 17 00:00:00 2001 From: Serg Date: Thu, 23 Oct 2025 20:36:32 +0700 Subject: [PATCH 2/7] feat: download script from github repo --- .github/workflows/custom-release-draft.yml | 39 +++++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index 9c018e9da..e342c6a95 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -1,11 +1,40 @@ -name: Draft Release +name: Custom Release Draft on: + workflow_call: + inputs: + target_branch: + required: false + type: string + default: master push: branches: - - develop - - feat/release-drafter + - master jobs: - call-release: - uses: Adamant-im/.github/.github/workflows/custom-release-draft.yml@master + release-draft: + runs-on: ubuntu-latest + steps: + - name: Checkout target repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install @octokit/rest + + - name: Download release-notes.js + run: | + set -e + mkdir -p .github/scripts + echo "Downloading release-notes.js from master..." + curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/master/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js + + - name: Run release notes script + run: node .github/scripts/release-notes.js + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} From 2f43b647c9ebdb1d70fb348afff70a62a2cc281f Mon Sep 17 00:00:00 2001 From: Serg Date: Thu, 23 Oct 2025 20:38:31 +0700 Subject: [PATCH 3/7] feat: add test branch --- .github/workflows/custom-release-draft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index e342c6a95..6a6555a6b 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -10,6 +10,7 @@ on: push: branches: - master + - feat/release-drafter jobs: release-draft: From 4f128496a1af5c1f89c738f80de3fa672eaf3f01 Mon Sep 17 00:00:00 2001 From: Serg Date: Thu, 23 Oct 2025 20:49:13 +0700 Subject: [PATCH 4/7] feat: run from dev branch --- .github/workflows/custom-release-draft.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index 6a6555a6b..e3daf24b0 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -31,8 +31,11 @@ jobs: run: | set -e mkdir -p .github/scripts - echo "Downloading release-notes.js from master..." - curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/master/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js + echo "Trying to download release-notes.js from feat/release-drafter..." + if ! curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/feat/release-drafter/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js; then + echo "feat/release-drafter not found, downloading from master..." + curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/master/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js + fi - name: Run release notes script run: node .github/scripts/release-notes.js From c0a076c4bf21e0dd06a68efa245cb39b5227b311 Mon Sep 17 00:00:00 2001 From: Serg Date: Thu, 23 Oct 2025 23:24:36 +0700 Subject: [PATCH 5/7] feat: add manual release draft workflow run --- .github/workflows/custom-release-draft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index e3daf24b0..4a5109f2b 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -11,6 +11,7 @@ on: branches: - master - feat/release-drafter + workflow_dispatch: jobs: release-draft: From 47761f493c525839f24689ed888a798e77514711 Mon Sep 17 00:00:00 2001 From: Serg Date: Wed, 29 Oct 2025 18:18:17 +0700 Subject: [PATCH 6/7] fix: install graphql --- .github/workflows/custom-release-draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index 4a5109f2b..6b850a7c4 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -26,7 +26,7 @@ jobs: node-version: 20 - name: Install dependencies - run: npm install @octokit/rest + run: npm install @octokit/rest @octokit/graphql - name: Download release-notes.js run: | From 55eb72843d80a51456382ae6e5014fa8471b9e56 Mon Sep 17 00:00:00 2001 From: Serg Date: Fri, 28 Nov 2025 17:53:35 +0700 Subject: [PATCH 7/7] fix: remove branch fallback --- .github/workflows/custom-release-draft.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/custom-release-draft.yml b/.github/workflows/custom-release-draft.yml index 6b850a7c4..38064e159 100644 --- a/.github/workflows/custom-release-draft.yml +++ b/.github/workflows/custom-release-draft.yml @@ -30,13 +30,10 @@ jobs: - name: Download release-notes.js run: | - set -e mkdir -p .github/scripts - echo "Trying to download release-notes.js from feat/release-drafter..." - if ! curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/feat/release-drafter/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js; then - echo "feat/release-drafter not found, downloading from master..." - curl -fsSL "https://raw.githubusercontent.com/Adamant-im/.github/master/.github/scripts/release-notes.js" -o .github/scripts/release-notes.js - fi + curl -fsSL \ + "https://raw.githubusercontent.com/Adamant-im/.github/main/.github/scripts/release-notes.js" \ + -o .github/scripts/release-notes.js - name: Run release notes script run: node .github/scripts/release-notes.js