Skip to content

Commit 996a8f9

Browse files
committed
ci: adding pre-release ci for oxygen sdk
1 parent e70e484 commit 996a8f9

File tree

10 files changed

+120
-7
lines changed

10 files changed

+120
-7
lines changed

.github/workflows/manual-publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- packages/sdk/server-ai
2525
- packages/telemetry/browser-telemetry
2626
- packages/sdk/combined-browser
27+
- packages/sdk/shopify-oxygen
2728
name: Publish Documentation
2829
jobs:
2930
build-publish:

.github/workflows/manual-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ on:
4040
- packages/ai-providers/server-ai-langchain
4141
- packages/telemetry/browser-telemetry
4242
- packages/sdk/combined-browser
43+
- packages/sdk/shopify-oxygen
4344
prerelease:
4445
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
4546
type: boolean
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: sdk/shopify-oxygen
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
branches: [main, 'feat/**']
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-shopify-oxygen:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
# https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started#requirements
21+
node-version: lts/*
22+
registry-url: 'https://registry.npmjs.org'
23+
- id: shared
24+
name: Shared CI Steps
25+
uses: ./actions/ci
26+
with:
27+
workspace_name: '@launchdarkly/shopify-oxygen-sdk'
28+
workspace_path: packages/sdk/shopify-oxygen

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"packages/store/node-server-sdk-redis": "4.2.14",
2222
"packages/telemetry/browser-telemetry": "1.0.11",
2323
"packages/telemetry/node-server-sdk-otel": "1.3.2",
24-
"packages/tooling/jest": "0.1.12"
24+
"packages/tooling/jest": "0.1.12",
25+
"packages/sdk/shopify-oxygen": "0.0.0"
2526
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ There are a number of categories of packages in the monorepo:
235235
5. **Tooling packages** (red): Development and testing tools
236236
- Jest testing utilities
237237

238-
### Depenencies
238+
### Dependencies
239239

240240
In general dependencies should be avoided unless they are absolutely necessary. For each dependency several considerations should be made:
241241

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Creating pre-releases modules
2+
3+
The following steps are to create a pre release modules which would walk through the initial
4+
CI work needed for new SDKs.
5+
6+
## 1. Extend `release-please-config.json`
7+
8+
Add a record of your new SDK package to `packages`
9+
```
10+
"PATH_TO_YOUR_PACKAGE": {
11+
"bump-minor-pre-major": true,
12+
"prerelease": true
13+
}
14+
```
15+
> NOTE: the `PATH_TO_YOUR_PACKAGE` needs to match the path in `package.json`
16+
> eg `packages/sdk/server-node`
17+
18+
This is the minimum changes you need to do. `bump-minor-pre-major` option means only
19+
minor version will be incremented while your package is in pre-release state.
20+
> Pre-release packages **MUST** be in major version `0`
21+
22+
## 2. Add initial release manifest
23+
24+
Add the following to `.release-please-manifest.json`
25+
```
26+
"PATH_TO_YOUR_PACKAGE": "0.0.0"
27+
```
28+
29+
## 3. Add option to manual workflows
30+
31+
Add `PATH_TO_YOUR_PACKAGE` to the `on.workflow_dispatch.inputs.workspace_path.options`
32+
array in the following files:
33+
- [`manual-publish-docs.yml`](./workflows/manual-publish-docs.yml)
34+
- [`manual-publish.yml`](./workflows/manual-publish.yml)
35+
36+
## 4. Create a CI non-release workflow for just the project
37+
38+
You will add a file in the `.github/workflows` directory that tells GHA (mostly) how to
39+
test your SDK. Below is a simple template to get started:
40+
```
41+
name: sdk/YOUR_SDK
42+
43+
on:
44+
push:
45+
branches: [main, 'feat/**']
46+
paths-ignore:
47+
- '**.md'
48+
pull_request:
49+
branches: [main, 'feat/**']
50+
paths-ignore:
51+
- '**.md'
52+
53+
jobs:
54+
build-test-YOUR_SDK:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: actions/setup-node@v4
59+
with:
60+
node-version: lts/*
61+
registry-url: 'https://registry.npmjs.org'
62+
- id: shared
63+
name: Shared CI Steps
64+
uses: ./actions/ci
65+
with:
66+
workspace_name: YOUR_PACKAGE_NAME
67+
workspace_path: PATH_TO_YOUR_PACKAGE
68+
```
69+
> NOTE: you should test your configuration on [your local machine](../.github/CI_CONTRIBUTING.md) if
70+
> possible.
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
2-
"extends": "../../../tsconfig.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"composite": true,
5-
"rootDir": ".",
6-
"outDir": "dist"
75
},
8-
"include": ["src/**/*.ts"],
9-
"exclude": ["**/*.test.ts", "dist", "node_modules", "__tests__", "example"]
6+
"include": ["src/**/*", "package.json"],
107
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": ["../../../typedoc.base.json"],
3+
"entryPoints": ["src/index.ts"],
4+
"out": "docs"
5+
}

release-please-config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
"bump-minor-pre-major": true,
1313
"prerelease": true
1414
},
15+
"packages/sdk/shopify-oxygen": {
16+
"bump-minor-pre-major": true,
17+
"prerelease": true,
18+
"extra-files": [
19+
"src/platform/OxygenInfo.ts"
20+
]
21+
},
1522
"packages/shared/common": {},
1623
"packages/shared/sdk-client": {},
1724
"packages/shared/sdk-server": {},

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
},
8888
{
8989
"path": "./packages/ai-providers/server-ai-vercel/tsconfig.ref.json"
90+
},
91+
{
92+
"path": "./packages/sdk/shopify-oxygen/tsconfig.ref.json"
9093
}
9194
]
9295
}

0 commit comments

Comments
 (0)