Skip to content

.github, elixir: support publishing in ci#126

Merged
npry merged 4 commits into
mainfrom
npry/elixir.ci.publish
Apr 22, 2026
Merged

.github, elixir: support publishing in ci#126
npry merged 4 commits into
mainfrom
npry/elixir.ci.publish

Conversation

@npry

@npry npry commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Support publishing ts_elixir to Hex in CI. Supports a push to staging.hex.pm via workflow_dispatch input. The hex.pm environment is locked down to require a separate approver, though admin override is permitted.

Removes dependency on ts_cli_util since that breaks things if we do want a version dep.

Provides a script (used only in ci, right before publishing) to alter the ts_elixir Cargo.toml to strip all the workspace details from it, since we're currently source-distributing. Notably: since the version of the Cargo.toml uploaded to hex.pm doesn't need to be the same one uploaded to crates.io, I currently specify a git dependency pinning to a specific rev in this repo (via github.sha) instead of the crates.io version. That removes the ordering dependency where we need to publish the crate strictly before the elixir package and makes version solving more deterministic (each elixir version is pinned to a specific version of the Rust — acting more like a precompiled included library semantically). That also means that the hex package won't see patch fixes, but we'd presumably want that to happen through a synchronized release anyway.

Provides another script that tries to push all our deps to staging.hex.pm so that we can actually push the tailscale package — it doesn't share a db with prod, and it seems like they wipe it sometimes, as the popular packages aren't there, and we need them there to make hex.publish work.

@npry npry force-pushed the npry/elixir.ci.publish branch 7 times, most recently from 986c225 to de5ef4b Compare April 21, 2026 12:10
@npry npry force-pushed the npry/elixir.ci.publish branch 3 times, most recently from a76e47f to c74a58d Compare April 21, 2026 12:28
@npry npry temporarily deployed to staging.hex.pm April 21, 2026 12:30 — with GitHub Actions Inactive
@npry npry force-pushed the npry/elixir.ci.publish branch from c74a58d to 41eb84f Compare April 21, 2026 12:35
@npry npry force-pushed the npry/elixir.ci.publish branch from 41eb84f to ddf417f Compare April 21, 2026 12:50
@npry npry force-pushed the npry/elixir.ci.publish branch from ddf417f to 5dd9a86 Compare April 21, 2026 13:13
@npry npry force-pushed the npry/elixir.ci.publish branch from 5dd9a86 to d50e79c Compare April 21, 2026 13:19
@npry npry force-pushed the npry/elixir.ci.publish branch from d50e79c to 1a9f1b0 Compare April 21, 2026 14:15
@npry npry deployed to staging.hex.pm April 21, 2026 14:18 — with GitHub Actions Active
@npry npry force-pushed the npry/elixir.ci.publish branch from 1a9f1b0 to 408e144 Compare April 21, 2026 15:05
@npry npry force-pushed the npry/elixir.ci.publish branch from 408e144 to e7ef5a8 Compare April 21, 2026 15:10
@npry npry changed the base branch from main to npry/elixir.ci April 21, 2026 15:10
@npry npry marked this pull request as ready for review April 21, 2026 15:42
@npry npry force-pushed the npry/elixir.ci.publish branch 2 times, most recently from 3dda403 to cac26b0 Compare April 22, 2026 13:37
@npry npry force-pushed the npry/elixir.ci.publish branch from cac26b0 to 51a902c Compare April 22, 2026 13:39
@npry npry force-pushed the npry/elixir.ci.publish branch 2 times, most recently from 35e3d89 to e6f89be Compare April 22, 2026 15:50
@npry npry force-pushed the npry/elixir.ci branch 2 times, most recently from b30a9f1 to 4174f3a Compare April 22, 2026 16:31
@npry npry force-pushed the npry/elixir.ci.publish branch from e6f89be to 7fb60ef Compare April 22, 2026 16:31
@npry npry force-pushed the npry/elixir.ci.publish branch from 7fb60ef to 010f17f Compare April 22, 2026 16:40
@npry npry force-pushed the npry/elixir.ci.publish branch from 010f17f to 9621ad5 Compare April 22, 2026 16:41
npry added 4 commits April 22, 2026 12:43
Remove `ts_cli_util` dep, fix LICENSE, fix file include list.

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I10169864729c4a60139db62beb3ee2946a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: Iaa08962600cd44249dce8b0bb5c6c64c6a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I317c905736b6eb115d3b2e91808b17aa6a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I53d29c8a26452b89a432ed28d0657f796a6a6964
@npry npry force-pushed the npry/elixir.ci.publish branch from 9621ad5 to 04ce61e Compare April 22, 2026 16:43
Base automatically changed from npry/elixir.ci to main April 22, 2026 16:54

@dylan-tailscale dylan-tailscale left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm, one potential issue

name: publish
runs-on: linux-x86_64-16cpu
needs: build_test
if: ${{ startsWith(github.ref, 'refs/tags/*') || github.event_name == 'workflow_dispatch' }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if: ${{ startsWith(github.ref, 'refs/tags/*') || github.event_name == 'workflow_dispatch' }}
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}

I don't think you want the wildcard here? If it is required, I need to fix that for Python lol

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

lol nope, you're right

@npry npry merged commit 04ce61e into main Apr 22, 2026
30 checks passed
@npry npry deleted the npry/elixir.ci.publish branch April 22, 2026 20:11
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