Skip to content

Commit 0f0a773

Browse files
authored
fix: add next (#75)
1 parent 2f1f284 commit 0f0a773

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.github/workflows/main.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,28 @@ jobs:
7171
echo CI_LAST_COMMIT_MSG
7272
- name: Semantic Release
7373
run: npm run semantic-release
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
77+
release-next:
78+
name: Release next
79+
runs-on: ubuntu-latest
80+
if: github.ref == 'refs/heads/next'
81+
needs: test
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: Use Node.js 20.x
85+
uses: actions/setup-node@v4
86+
with:
87+
node-version: '20.x'
88+
- run: npm install
89+
- name: extracting last commit message
90+
run: |
91+
echo "CI_LAST_COMMIT_MSG=$(git show -s --format="%s")" >> $GITHUB_ENV
92+
echo CI_LAST_COMMIT_MSG
93+
- name: Next Deployment
94+
run: npm run deploy:next
95+
- name: Semantic Release (Dry Run)
96+
run: npm run semantic-release-dry
7497
env:
7598
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"test-postdeploy": "mocha --spec test/post-deploy.test.js",
1616
"deploy:dev": "node prepare-deploy.js && wrangler deploy -c wrangler-versioned.toml",
1717
"deploy:ci": "node prepare-deploy.js && wrangler deploy -e ci -c wrangler-versioned.toml",
18+
"deploy:next": "node prepare-deploy.js && wrangler deploy -e next -c wrangler-versioned.toml",
1819
"deploy:production": "node prepare-deploy.js && wrangler deploy -e production -c wrangler-versioned.toml",
1920
"log": "wrangler tail --format pretty",
2021
"log:ci": "wrangler tail --format pretty -e ci",

wrangler.toml

+20
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ bucket_name = "adobe-commerce-catalog-dev"
4141
VERSION = "@@VERSION@@-ci"
4242
ENVIRONMENT = "ci"
4343

44+
# ----------------------------------------------------------------------
45+
# next environment
46+
47+
[env.next]
48+
name = "adobe-commerce-api-next"
49+
50+
kv_namespaces = [
51+
{ binding = "CONFIGS", id = "bb91e12a65a8462282396f32e63406f1", preview_id = "bb91e12a65a8462282396f32e63406f1" },
52+
{ binding = "KEYS", id = "0ca5d0ba0150453bb8aafcdf4304dc7a", preview_id = "0ca5d0ba0150453bb8aafcdf4304dc7a" }
53+
]
54+
55+
[[env.next.r2_buckets]]
56+
binding = "CATALOG_BUCKET"
57+
preview_bucket_name = "adobe-commerce-catalog"
58+
bucket_name = "adobe-commerce-catalog"
59+
60+
[env.next.vars]
61+
VERSION = "@@VERSION@@-next"
62+
ENVIRONMENT = "next"
63+
4464
# ----------------------------------------------------------------------
4565
# production environment
4666

0 commit comments

Comments
 (0)