ci: add client release workflow#19
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow (release.yml) that validates version metadata, resolves legacy template releases, builds an external Assets-Editor CLI, packages the main client and two legacy client zips with patched game data files, and publishes them to GitHub releases or performs a dry run. ChangesRelease Publishing Workflow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Trigger
participant Workflow
participant AssetsEditor
participant GitHubReleases
Trigger->>Workflow: push tag / workflow_dispatch
Workflow->>Workflow: validate package.json version
Workflow->>GitHubReleases: query legacy template release
GitHubReleases-->>Workflow: template tag
Workflow->>AssetsEditor: build CLI (dotnet publish)
Workflow->>AssetsEditor: export/validate legacy assets
Workflow->>Workflow: patch Tibia.dat/Tibia.spr, repackage zips
alt DRY_RUN true
Workflow->>Workflow: append dry-run summary
else DRY_RUN false
Workflow->>GitHubReleases: create/edit release, upload zips, set latest
end
Related issues: None found in the provided context. Related PRs: None found in the provided context. Suggested labels: ci, workflow, release Suggested reviewers: dudantas 🐰 A workflow hops through tags with care, ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to automate publishing tagged client releases for dudantas/tibia-client, including validation, packaging of the “modern” client zip, regeneration of legacy client templates via the Assets Editor legacy exporter, and optional release publication.
Changes:
- Introduces a new
Releaseworkflow triggered by tag pushes andworkflow_dispatch(withdry_runsupport). - Builds the Assets Editor CLI from a pinned commit and uses it to export/validate legacy assets for
cip860-extendedandclient11-15x. - Packages and (when not
dry_run) uploadstibia-client-<tag>.zip,client-11.zip, andtibia-8.6-extended.zipto the GitHub Release.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| $ErrorActionPreference = "Stop" | ||
|
|
||
| $packageVersion = (Get-Content -Raw package.json | ConvertFrom-Json).version | ||
| if ($packageVersion -ne $env:RELEASE_TAG) { | ||
| throw "package.json version '$packageVersion' does not match release tag '$env:RELEASE_TAG'." | ||
| } | ||
|
|
||
| node .codex\skills\tibia-client-release\scripts\validate-release.mjs |
| if (-not $releaseExists) { | ||
| gh release create $env:RELEASE_TAG ` | ||
| --repo dudantas/tibia-client ` | ||
| --verify-tag ` | ||
| --title $env:RELEASE_TAG ` | ||
| --notes $env:RELEASE_TAG | ||
| } | ||
| else { | ||
| gh release edit $env:RELEASE_TAG ` | ||
| --repo dudantas/tibia-client ` | ||
| --title $env:RELEASE_TAG ` | ||
| --notes $env:RELEASE_TAG | ||
| } |
Summary
Adds a GitHub Actions release workflow for
dudantas/tibia-client.The workflow runs on client version tags such as
15.13.02dfc3, or manually throughworkflow_dispatchwith an existing tag.It packages and publishes:
tibia-client-<tag>.zipfrom the tagged modern client files, extracting archived runtime files such asbin/Qt6WebEngineCore.rarbefore packaging.client-11.zip, using the latest previous client release that has this complete client template, replacingTibia.dat,Tibia.spr, anditemFlag.otmlwith freshly exported files from the current tag assets.tibia-8.6-extended.zip, using the same template/update flow for the 8.60 extended client.Release flow
package.json.versionagainst the release tag..codex/skills/tibia-client-release/scripts/validate-release.mjsbefore packaging.dudantas/Assets-Editorcommitd8b1c0115574d8c6a9e7a296a0e281a9bc783584.cip860-extendedandclient11-15xlegacy assets.Notes
This depends on the Assets Editor CLI work from Arch-Mina/Assets-Editor#90. Keeping this PR as draft is safer until that exporter is merged or released from a stable tag.
Validation
git diff --checkSummary by CodeRabbit