Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/custom-release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Custom Release Draft

on:
workflow_call:
inputs:
target_branch:
required: false
type: string
default: master
push:
branches:
- master
- feat/release-drafter
workflow_dispatch:

jobs:
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 @octokit/graphql

- 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

- name: Run release notes script
run: node .github/scripts/release-notes.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}