Commit Graph

22 Commits

Author SHA1 Message Date
Julien Goux
2eca1b4d35 chore: prepare for v2.0.0 (#405)
## Summary

This PR prepares `supabase/setup-cli` for `v2.0.0`.

The main goal of this release is to simplify the action and modernize
the repo/tooling around a Bun-based implementation, while tightening
workflows, tests, and documentation.

## What Changed

### Action runtime
- switched the action from a Node/compiled `dist` runtime to a Bun-based
composite action
- removed the checked-in `dist/` output entirely
- simplified the action source down to a single runtime file in
`src/main.ts`
- kept the public action interface the same:
  - `with.version`
  - `outputs.version`

### Tooling
- switched package management and local tooling from npm to Bun
- removed Rollup and the build step
- replaced Jest with Bun’s native test runner
- replaced Prettier with `oxfmt`
- replaced ESLint with `oxlint`
- enabled type-aware/type-check linting with `oxlint-tsgolint`
- simplified TypeScript config to a single `tsconfig.json` extending
`@tsconfig/bun`

### Tests
- moved tests next to the runtime source
- rewrote tests to focus on meaningful user-facing action behavior
- added coverage for:
  - default entrypoint execution
  - latest version installs
  - legacy version installs
  - modern pinned version installs
  - failure when the installed CLI cannot report a version
- action code coverage is now `100%`

### Workflows
- renamed workflow files for clarity:
  - `test.yml` -> `ci.yml`
  - `start.yml` -> `e2e.yml`
- updated workflow/job naming so required checks are clean and stable:
  - `CI`
  - `E2E`
  - `CodeQL`
  - `Licensed`
- added aggregate PR-facing checks so branch protection does not need
matrix legs
- made CI and E2E skip heavy jobs on draft PRs
- made E2E run automatically on ready PRs and new commits
- simplified CodeQL config by removing the separate config file
- updated action pins to current releases using commit SHAs
- refined Dependabot for Bun-era updates and non-major auto-merge

### Docs
- refreshed `README.md` and `docs/index.md` for the new v2 behavior
- updated examples to use `@v2`
- added a practical example for exporting local Supabase env vars after
`supabase start`
- removed stale references to old local/dev flows

## Breaking / Notable Changes

- the action now runs as a Bun-based composite action instead of a
prebuilt JavaScript action
- no checked-in `dist/` artifacts anymore
- self-hosted runners now need the prerequisites expected by the
composite action path:
  - `bash`
- network access to install Bun/dependencies and download the Supabase
CLI

## Validation

Verified locally with:
- `bun run format:check`
- `bun run lint`
- `bun test`
- `bun run ci`

Also updated workflows and branch-protection-friendly check names so PR
validation is cleaner going forward.

## Follow-up

After merge, branch protection should require only:
- `CI`
- `E2E`
- `CodeQL`
- `Licensed`

---------

Co-authored-by: licensed-ci <licensed-ci@users.noreply.github.com>
2026-04-03 17:51:37 +02:00
Han Qiao
b60b5899c7 chore: migrate to esm (#334)
* chore: update unit tests

* fix: follow latest action template

* chore: add licenses and workflows

* chore: remove bloat

* chore: fix linter
2025-07-23 15:04:43 +08:00
Han Qiao
d347ba47d3 feat: bump default cli version to v2 (#324)
fix: bump default cli version to v2
2025-03-21 06:07:54 +08:00
Abizer Lokhandwala
fe52e8551e feat: bump default cli version to 1.178.2 (#287)
* feat: bump default cli version to 1.176.10

* Update action.yml

* Update README.md

* Update README.md

* Update start.yml

---------

Co-authored-by: Han Qiao <sweatybridge@gmail.com>
Co-authored-by: Han Qiao <qiao@supabase.io>
2024-07-03 11:43:50 +08:00
Qiao Han
87162dc7e9 feat: bump default cli version to 1.136.3 2024-01-31 12:44:59 +08:00
Han Qiao
b7e5a9d3ac chore: update docs for updating action v1 2024-01-29 00:12:30 +08:00
Han Qiao
a486ca4eff chore: mention bitbucket and gitlab CI support 2024-01-17 15:21:50 +08:00
Qiao Han
8c367f4e1e chore: update release docs 2023-05-17 19:03:33 +08:00
Qiao Han
6333c3ad34 chore: update distribution file 2023-05-17 18:57:23 +08:00
Qiao Han
3fad79ab52 chore: update default cli version to 1.28.3 2023-01-05 11:02:33 +08:00
Han Qiao
3d880f790e fix: support new release archive name (#112)
* fix: support new release archive name

* chore: update default cli version to 1.28.0
2023-01-04 12:03:10 +08:00
Qiao Han
6fce44cc9c chore: update readme to use db start 2022-11-28 13:58:02 +08:00
Han Qiao
ce2cb4237d chore: update suggested version of CLI to 1.12.2 2022-11-12 11:46:04 +08:00
Han Qiao
7c322cd16b chore: update suggested version of CLI in readme 2022-11-12 11:44:59 +08:00
y-yagi
ebf970dfe2 feat: support downloading the latest version automatically (#70) 2022-10-11 16:11:00 +00:00
y-yagi
913e9e7c0a chore: simplify an example of diff checking (#69)
The original sample hides the result of `git diff`. So if `git diff` returns an
error(e.g. invalid file name specified), the result will be success.

We can use `--exit-code ` option if we only want to know whether differences
exist without depending on other commands.
Ref: https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---exit-code
2022-10-07 10:45:15 +08:00
Han Qiao
bb0eecfe00 Update README.md 2022-08-15 10:03:11 +08:00
Han Qiao
bb9cbf8783 Update README.md 2022-08-15 09:55:15 +08:00
Han Qiao
cf53256c7b Update default cli version (#21) 2022-08-15 09:27:08 +08:00
Han Qiao
234d31220e Update readme and default version (#10) 2022-08-06 02:27:39 +08:00
Qiao Han
39cbf44fc1 Upgrade to node 18 2022-08-04 00:15:17 +08:00
Han Qiao
1633052be9 Initial commit 2022-08-03 21:32:01 +08:00