Skip to content

ci: add automatic tip (nightly) prerelease workflow#391

Open
scroix wants to merge 1 commit intomuseumsvictoria:devfrom
scroix:feature/tip-release
Open

ci: add automatic tip (nightly) prerelease workflow#391
scroix wants to merge 1 commit intomuseumsvictoria:devfrom
scroix:feature/tip-release

Conversation

@scroix
Copy link
Copy Markdown
Member

@scroix scroix commented Feb 6, 2026

2026-02-06_SAZJ7cVU@2x

Adds an always-current "tip" prerelease that rebuilds on every green push to dev — so there's always a downloadable jar for anyone who wants to test the latest without building from source.

The workflow chains three jobs (build → release → tag) so the release only publishes after a successful build, and the tag only moves after a successful release. Old assets are cleaned up before uploading, so the release page stays tidy.

Also supports workflow_dispatch for manual re-runs.

Inspired by Ghostty's tip release.

@scroix
Copy link
Copy Markdown
Member Author

scroix commented Feb 14, 2026

I think this is going to be key in allowing organisations to test "dev" builds at their own leisure in controlled circumstances (temporary exhibitions, lab spaces, etc) without needing to build from source.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to publish an always-up-to-date tip prerelease build from dev after CI passes, providing a downloadable jar without requiring local builds.

Changes:

  • Introduces a new Tip Release workflow triggered by successful Build and Test runs on dev (and manual dispatch).
  • Builds and uploads the standalone nodelhost-*.jar, then publishes/updates a prerelease named tip.
  • Moves the tip tag after a successful release update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +100 to +116
- name: Delete old release assets
uses: actions/github-script@v7
with:
script: |
const { data: release } = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "tip",
}).catch(() => ({ data: null }));
if (!release) return;
for (const asset of release.assets) {
await github.rest.repos.deleteReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
asset_id: asset.id,
});
}
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release assets are deleted before the new jar is uploaded. If the upload step fails (transient API error, rate limit, etc.), the tip release will be left without assets until the next successful run. Consider uploading the new asset first (or only deleting the specific previous jar asset after a successful upload) to avoid temporarily breaking the download link.

Copilot uses AI. Check for mistakes.
(github.event_name == 'workflow_run'
&& github.event.workflow_run.conclusion == 'success'
&& github.event.workflow_run.head_branch == 'dev')
|| github.event_name == 'workflow_dispatch'
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch runs are allowed unconditionally, which means a user can publish/move the tip release from any branch/commit. If tip is intended to always reflect dev, consider restricting manual dispatch runs to refs/heads/dev (or add an input SHA/branch and use it consistently for checkout/tagging/release notes).

Suggested change
|| github.event_name == 'workflow_dispatch'
|| (github.event_name == 'workflow_dispatch'
&& github.ref == 'refs/heads/dev')

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +126
name: Nodel Tip ("Nightly")
prerelease: true
body_path: release_notes.md
files: ${{ needs.build.outputs.jar_name }}
make_latest: false
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

softprops/action-gh-release is configured to upload ${{ needs.build.outputs.jar_name }}, but the downloaded artifact will typically preserve the original directory structure from the upload (e.g. nodel-jyhost/build/distributions/standalone/...). This can cause the release step to fail to find the file. Consider outputting the jar path from the build job and using that here, or copying/renaming the jar to a known flat location before uploading/downloading so files: points at an existing path.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +20
if: >-
(github.event_name == 'workflow_run'
&& github.event.workflow_run.conclusion == 'success'
&& github.event.workflow_run.head_branch == 'dev')
|| github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is triggered by workflow_run, successful runs can complete out of order (an older commit’s CI run may finish after a newer one). In that case this workflow can move the tip tag backwards. To keep the tag always-current, add a guard before releasing/tagging that verifies the triggering SHA is still the HEAD of dev (e.g., fetch origin/dev and compare), and exit early if it isn’t.

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +51
cache: gradle

Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow uses actions/setup-java’s cache: gradle, but the repo’s main CI workflow standardizes on gradle/actions/setup-gradle@v4 for Gradle setup/caching (see .github/workflows/build.yml). For consistency and to match the existing CI behavior, consider using the same setup-gradle action here (and drop the cache: setting).

Suggested change
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants