Skip to content

Add docs for PhantomCard #40

Add docs for PhantomCard

Add docs for PhantomCard #40

name: Generate GitHub Release Draft
on:
pull_request:
types: [closed]
jobs:
on-merge:
if: |
(github.event.pull_request.merged == true
&& startsWith(github.event.pull_request.title, 'Update version information to'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install Codex CLI
run: |
sudo npm install -g @openai/[email protected]
- name: Collect changelog from PR
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_KEY }}
CODEX_QUIET_MODE: 1
GH_TOKEN: ${{ github.token }}
run: |
sed '/--/q' debian/changelog | sed '1, 2d' | head -n -2 > changelog.txt
codex -a auto-edit -q \
"""
Remove the '*' and indent in changelog.txt.
"""
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
versionNum=$(echo ${{ github.event.pull_request.title }} | awk '{print $NF}')
gh release create "$versionNum" \
--draft \
--title "$versionNum" \
--notes "$(cat changelog.txt)"