@gpc-cli/plugin-ci 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +78 -0
  2. package/package.json +5 -2
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @gpc-cli/plugin-ci
2
+
3
+ CI/CD helpers for GPC. Auto-detects CI environments and writes GitHub Actions step summaries.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @gpc-cli/plugin-ci
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ Add to your `.gpcrc.json`:
14
+
15
+ ```json
16
+ {
17
+ "plugins": ["@gpc-cli/plugin-ci"]
18
+ }
19
+ ```
20
+
21
+ The plugin activates automatically when running in a CI environment.
22
+
23
+ ## What It Does
24
+
25
+ - **Detects CI provider** — GitHub Actions, GitLab CI, Jenkins, CircleCI, Bitrise
26
+ - **Writes step summaries** — Markdown tables in `$GITHUB_STEP_SUMMARY` after each command
27
+ - **Reports errors** — Structured error output in step summaries when commands fail
28
+
29
+ ## Usage in GitHub Actions
30
+
31
+ ```yaml
32
+ - name: Install GPC
33
+ run: npm install -g @gpc-cli/cli @gpc-cli/plugin-ci
34
+
35
+ - name: Upload Release
36
+ env:
37
+ GPC_SERVICE_ACCOUNT: ${{ secrets.GPC_SERVICE_ACCOUNT }}
38
+ GPC_APP: com.example.myapp
39
+ run: gpc releases upload app.aab --track internal
40
+ # Step summary is written automatically
41
+ ```
42
+
43
+ ## Programmatic Usage
44
+
45
+ ```typescript
46
+ import { detectCIEnvironment, writeStepSummary } from "@gpc-cli/plugin-ci";
47
+
48
+ const ci = detectCIEnvironment();
49
+
50
+ if (ci.isCI) {
51
+ console.log(`Running in ${ci.provider}`);
52
+ console.log(`Branch: ${ci.branch}`);
53
+ console.log(`Commit: ${ci.commitSha}`);
54
+ }
55
+
56
+ if (ci.hasStepSummary) {
57
+ writeStepSummary("| Command | Status |\n|---------|--------|\n| upload | ok |");
58
+ }
59
+ ```
60
+
61
+ ## CI Detection
62
+
63
+ | Provider | Detected By |
64
+ |----------|-------------|
65
+ | GitHub Actions | `GITHUB_ACTIONS` |
66
+ | GitLab CI | `GITLAB_CI` |
67
+ | Jenkins | `JENKINS_URL` |
68
+ | CircleCI | `CIRCLECI` |
69
+ | Bitrise | `BITRISE_IO` |
70
+ | Generic CI | `CI` |
71
+
72
+ ## Part of the GPC Monorepo
73
+
74
+ This is the first-party CI plugin for [GPC](https://github.com/yasserstudio/gpc). See the [CI/CD Guide](https://yasserstudio.github.io/gpc/ci-cd/) for pipeline recipes.
75
+
76
+ ## License
77
+
78
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpc-cli/plugin-ci",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CI/CD helpers for GPC",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@gpc-cli/plugin-sdk": "0.1.0"
18
+ "@gpc-cli/plugin-sdk": "0.1.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^25.3.5"
@@ -26,6 +26,9 @@
26
26
  "plugin"
27
27
  ],
28
28
  "license": "MIT",
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
29
32
  "scripts": {
30
33
  "build": "tsup",
31
34
  "dev": "tsup --watch",