@invarn/cibuild 1.3.1 → 1.3.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 (3) hide show
  1. package/README.md +14 -24
  2. package/dist/cli.cjs +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -72,6 +72,8 @@ ci run .ci/pipelines/cibuild.yml -w release # Run a specific workflow
72
72
  | `ci edit <path> [-w <name>]` | View pipeline and edit step inputs |
73
73
  | `ci secrets add <var> <path> [-w <name>]` | Add a secret (prompted interactively) |
74
74
  | `ci secrets add <var> <path> --file <file>` | Add a secret from a file |
75
+ | `ci secrets upload [--env <name>]` | Upload secrets to GitHub environment |
76
+ | `ci secrets sync-workflow <path>` | Sync secret mappings into workflow YAML |
75
77
  | `ci --help` | Show help |
76
78
 
77
79
  ### Options
@@ -93,6 +95,17 @@ ci secrets add KEYSTORE_BASE64 pipeline.yml --file release.keystore
93
95
  ci secrets add SLACK_WEBHOOK pipeline.yml -w release
94
96
  ```
95
97
 
98
+ ### Deploy to GitHub
99
+
100
+ Push all local secrets to a GitHub Environment and sync your workflow in two commands:
101
+
102
+ ```bash
103
+ ci secrets upload --env cibuild
104
+ ci secrets sync-workflow .github/workflows/ci.yml
105
+ ```
106
+
107
+ `upload` pushes every secret to the `cibuild` environment on GitHub. `sync-workflow` adds the required `env:` mappings to your workflow file so the action can read them. Requires [GitHub CLI](https://cli.github.com/) (`gh auth login`).
108
+
96
109
  ## GitHub Actions
97
110
 
98
111
  Use cibuild directly in your GitHub Actions workflows:
@@ -120,30 +133,7 @@ jobs:
120
133
  | `workflow` | No | First workflow | Workflow name within the pipeline |
121
134
  | `version` | No | `latest` | cibuild version to install |
122
135
 
123
- ### Secrets in GitHub Actions
124
-
125
- Upload your local secrets to a GitHub Environment, then reference them in your workflow:
126
-
127
- ```bash
128
- ci secrets upload --env cibuild
129
- ```
130
-
131
- ```yaml
132
- jobs:
133
- build:
134
- runs-on: macos-latest
135
- environment: cibuild
136
- env:
137
- CIBUILD_S__SLACK_WEBHOOK: ${{ secrets.CIBUILD_S__SLACK_WEBHOOK }}
138
- CIBUILD_SW__RELEASE__KEYSTORE_PASS: ${{ secrets.CIBUILD_SW__RELEASE__KEYSTORE_PASS }}
139
- steps:
140
- - uses: actions/checkout@v4
141
- - uses: invarnhq/cibuild@v1
142
- with:
143
- workflow: release
144
- ```
145
-
146
- The action automatically maps GitHub context to cibuild environment variables (`GIT_BRANCH`, `GIT_COMMIT`, `BUILD_NUMBER`, `BUILD_URL`).
136
+ The action automatically maps GitHub context to cibuild environment variables (`GIT_BRANCH`, `GIT_COMMIT`, `BUILD_NUMBER`, `BUILD_URL`). See [Secrets](#secrets) for setting up secret access in CI.
147
137
 
148
138
  ## Examples
149
139