name: ๐Ÿ› Update Issue Form Versions on: release: # Also fire on drafts/prereleases so versions that aren't a full release yet # (TestFlight / dev builds) still land in the dropdown. types: [published, released, prereleased, created, deleted] schedule: - cron: "0 3 * * 1" # Weekly safety net (Mondays 03:00 UTC) in case a release event was missed workflow_dispatch: concurrency: group: update-issue-form-${{ github.event.release.tag_name || github.run_id }} cancel-in-progress: true permissions: contents: read jobs: update-issue-form: name: ๐Ÿ”ข Populate version dropdown runs-on: ubuntu-24.04 permissions: contents: write pull-requests: write steps: - name: ๐Ÿ“ฅ Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: ๐Ÿž Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: latest - name: ๐Ÿ”ข Populate version dropdown from GitHub releases id: populate run: bun scripts/update-issue-form.mjs env: GH_TOKEN: ${{ github.token }} GITHUB_REPOSITORY: ${{ github.repository }} - name: ๐Ÿ“ฌ Create pull request id: cpr uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: add-paths: .github/ISSUE_TEMPLATE/issue_report.yml branch: ci/update-issue-form base: develop delete-branch: true labels: โš™๏ธ ci, ๐Ÿค– github-actions commit-message: "chore: update issue form version dropdown" title: "chore: update issue form version dropdown" # Follows .github/pull_request_template.md so the bot PR isn't flagged by PR validation. body: | # ๐Ÿ“ฆ Pull Request ## ๐Ÿ“ Description Automated update of the **Streamyfin Version** dropdown in `.github/ISSUE_TEMPLATE/issue_report.yml`, populated from the latest GitHub releases by `scripts/update-issue-form.mjs` (draft releases shown as `X (TestFlight)`). **Version dropdown now lists:** ${{ steps.populate.outputs.versions }} Triggered by `${{ github.event_name }}`${{ github.event.release.tag_name && format(' โ€” release {0}', github.event.release.tag_name) || '' }} ยท [run ${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}). ## ๐Ÿท๏ธ Ticket / Issue N/A โ€” automated maintenance. ### ๐Ÿ–ผ๏ธ Screenshots / GIFs (if UI) N/A โ€” issue-template metadata only, no app UI. ## โœ… Checklist - [x] Iโ€™ve read the [contribution guidelines](CONTRIBUTING.md) - [x] Verified that changes behave as expected for all platforms - [x] Code passes lint/formatting and type checks (`tsc`/`biome`) - [x] No secrets, hardcoded credentials, or private config files are included - [x] I've declared if AI was used to assist with this PR (by uncommenting the line at the bottom, or not) ## ๐Ÿ” Testing Instructions N/A โ€” generated by CI from published releases; review the dropdown diff in `issue_report.yml`. - name: ๐Ÿ”€ Enable auto-merge if: steps.cpr.outputs.pull-request-operation == 'created' env: GH_TOKEN: ${{ github.token }} run: | gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" \ || echo "::warning::Could not enable auto-merge โ€” enable 'Allow auto-merge' in repo settings (and branch protection); merge the PR manually for now."