Skip to content

ci: add CI and release workflows (auto-publish to crates.io + npm) - #36

Merged
reatlat merged 1 commit into
mainfrom
chore/ci-publish
Aug 11, 2026
Merged

ci: add CI and release workflows (auto-publish to crates.io + npm)#36
reatlat merged 1 commit into
mainfrom
chore/ci-publish

Conversation

@reatlat

@reatlat reatlat commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds CI and release automation so the plugin auto-publishes to crates.io and npm when a GitHub release is published.

What's added

.github/workflows/ci.yml

  • Runs cargo check and npm run build on every push to main and on PRs
  • Catches build breakages before they land

.github/workflows/release.yml

  • Triggers on release: published (when you publish a GitHub release)
  • Publishes to crates.io using CARGO_REGISTRY_TOKEN secret
  • Publishes to npm using NPM_TOKEN secret
  • Runs in parallel (two jobs, independent)

Required secrets

These need to be added in repo Settings > Secrets and variables > Actions:

Secret Where to get it
CARGO_REGISTRY_TOKEN crates.io > Account Settings > API Tokens (needs publish permission for tauri-plugin-aptabase)
NPM_TOKEN npmjs.com > Access Tokens (needs publish permission for @aptabase/tauri)

@cristipufu — since you own both registry packages, you can generate these tokens and add them as repo secrets. No ownership transfer needed. Or if you'd prefer to add @reatlat as owner on both registries:

  • crates.io: cargo owner -a github:reatlat tauri-plugin-aptabase
  • npm: npm owner add reatlat @aptabase/tauri

How it works after this

  1. Merge PRs to main
  2. Bump version in Cargo.toml + package.json
  3. Push git tag matching the version (e.g. 1.2.0)
  4. Create GitHub release from that tag
  5. Both workflows fire automatically — crates.io and npm get the new version

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Actions automation for this Tauri plugin so CI runs on pushes/PRs and releases can publish artifacts to crates.io and npm when a GitHub Release is published.

Changes:

  • Introduces a CI workflow that installs JS deps, builds the JS bundle, and runs cargo check.
  • Introduces a release workflow with separate jobs to publish to crates.io and to npm on release.published.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/ci.yml Adds a CI job for JS build + Rust cargo check on push/PR.
.github/workflows/release.yml Adds release-triggered publishing jobs for crates.io and npm.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
@reatlat
reatlat force-pushed the chore/ci-publish branch 3 times, most recently from 7d166c2 to fb849cc Compare August 11, 2026 01:33
- ci.yml: cargo check + npm build on push/PR
- release.yml: auto-publish to crates.io and npm on GitHub release published
  Requires CARGO_REGISTRY_TOKEN and NPM_TOKEN secrets in repo settings
@reatlat
reatlat merged commit de77fae into main Aug 11, 2026
1 check passed
@reatlat
reatlat deleted the chore/ci-publish branch August 11, 2026 01:49
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