Repository navigation
Update README for Sharkbot #73
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: 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/codex@0.110.0 | |
| - name: Collect changelog from PR | |
| env: | |
| CODEX_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 exec --full-auto \ | |
| """ | |
| 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)" |