Skip to content

Commit 7b91a96

Browse files
authored
Merge pull request #28 from HiDeoo/hd-feat-yes-option
2 parents 668b938 + 015d29c commit 7b91a96

File tree

9 files changed

+3542
-2319
lines changed

9 files changed

+3542
-2319
lines changed

.github/workflows/integration.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,16 @@ jobs:
1717
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
21-
22-
- name: Install Node.js
23-
uses: actions/setup-node@v3
24-
with:
25-
node-version: 14
20+
uses: actions/checkout@v4
2621

2722
- name: Install pnpm
28-
uses: pnpm/[email protected]
29-
with:
30-
version: 7.4.0
31-
run_install: false
32-
33-
- name: Get pnpm store directory path
34-
id: pnpm-store-dir-path
35-
run: echo "::set-output name=dir::$(pnpm store path)"
23+
uses: pnpm/action-setup@v4
3624

37-
- name: Setup pnpm store cache
38-
uses: actions/cache@v3
39-
id: pnpm-store-cache
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
4027
with:
41-
path: ${{ steps.pnpm-store-dir-path.outputs.dir }}
42-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
43-
restore-keys: |
44-
${{ runner.os }}-pnpm-
28+
cache: pnpm
29+
node-version: 18
4530

4631
- name: Install dependencies
4732
run: pnpm install

.github/workflows/release.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
1518

1619
- name: Install Node.js
1720
uses: actions/setup-node@v3
1821
with:
19-
node-version: 14
22+
cache: pnpm
23+
node-version: 18
2024
registry-url: 'https://registry.npmjs.org'
2125

22-
- name: Install pnpm
23-
uses: pnpm/[email protected]
24-
with:
25-
version: 7.4.0
26-
run_install: false
27-
28-
- name: Get pnpm store directory path
29-
id: pnpm-store-dir-path
30-
run: echo "::set-output name=dir::$(pnpm store path)"
31-
32-
- name: Setup pnpm store cache
33-
uses: actions/cache@v3
34-
id: pnpm-store-cache
35-
with:
36-
path: ${{ steps.pnpm-store-dir-path.outputs.dir }}
37-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-pnpm-
40-
4126
- name: Install dependencies
4227
run: pnpm install
4328

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## Unreleased
6+
7+
### 🚀 Features
8+
9+
- Add the `--yes` option to skip confirmation prompts in interactive mode.
10+
511
## v0.4.0
612

713
### 🐞 Bug Fixes

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ This can be especially useful if you ever need to push environment variables [fr
8888

8989
```yaml
9090
- name: Push environment variables from GitHub Actions
91-
run: pnpm vercel-env-push .env.local preview -t "$VERCEL_TOKEN"
91+
run: pnpm vercel-env-push .env.ci preview -t "$VERCEL_TOKEN" --yes
9292
env:
9393
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
9494
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
@@ -103,6 +103,21 @@ The Git branch to apply the environment variables to when pushing environment va
103103
$ pnpm vercel-env-push .env.local preview --branch my-preview-branch
104104
```
105105

106+
##### `-y, --yes`
107+
108+
Skip confirmation prompt for pushing environment variables.
109+
110+
This can be especially useful if you ever need to push environment variables [from a CI pipeline](https://vercel.com/support/articles/using-vercel-cli-for-custom-workflows).
111+
112+
```yaml
113+
- name: Push environment variables from GitHub Actions
114+
run: pnpm vercel-env-push .env.ci preview -t "$VERCEL_TOKEN" --yes
115+
env:
116+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
117+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
118+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
119+
```
120+
106121
### API
107122

108123
`vercel-env-push` can also be used through an API:
@@ -168,7 +183,7 @@ await pushEnvVars('.env.local', ['preview', 'production'], {
168183
```
169184

170185
> **Note**
171-
> The `dryRun` & `interactive` options are also available through the API but are mostly useless in this context.
186+
> The `dryRun`, `interactive`, & `yes` options are also available through the API but are mostly useless in this context.
172187

173188
## License
174189

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"cli.mjs",
5151
"dist"
5252
],
53-
"packageManager": "pnpm@7.4.0",
53+
"packageManager": "pnpm@9.15.9",
5454
"sideEffects": false,
5555
"engines": {
5656
"node": ">=14.0.0"

0 commit comments

Comments
 (0)