fix: install graphql #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |