Skip to content

Commit a10567a

Browse files
authored
chore: release 1.0.0 (#68)
* chore: release 1.0.0 * chore: allow releasing the monitor app with changesets * fix: install Playwright system deps on every CI run System dependencies like libwoff2dec.so are at the OS level and not part of the browser cache, so they need to be installed on every run. * chore: allow versioning of contracts with changesets
1 parent 4cdac50 commit a10567a

9 files changed

Lines changed: 46 additions & 15 deletions

File tree

.changeset/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"linked": [],
77
"access": "public",
88
"baseBranch": "main",
9-
"updateInternalDependencies": "patch"
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["cwv-monitor-client"]
1011
}

.github/workflows/check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,19 @@ jobs:
9696
9797
- name: Cache Playwright Binaries
9898
id: playwright-cache
99+
if: steps.changes.outputs.client_changed == 'true' || steps.changes.outputs.sdk_changed == 'true'
99100
uses: actions/cache@v5
100101
with:
101102
path: ~/.cache/ms-playwright
102103
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
103104

104105
- name: Install Playwright Browsers
105106
if: (steps.changes.outputs.client_changed == 'true' || steps.changes.outputs.sdk_changed == 'true') && steps.playwright-cache.outputs.cache-hit != 'true'
106-
run: pnpm --filter cwv-monitor-client exec playwright install --with-deps
107+
run: pnpm --filter cwv-monitor-client exec playwright install
108+
109+
- name: Install Playwright System Dependencies
110+
if: steps.changes.outputs.client_changed == 'true' || steps.changes.outputs.sdk_changed == 'true'
111+
run: pnpm --filter cwv-monitor-client exec playwright install-deps
107112

108113
- name: Run E2E tests
109114
if: steps.changes.outputs.client_changed == 'true' || steps.changes.outputs.sdk_changed == 'true'

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Push Docker Images
22

33
on:
44
push:
5-
tags: ["v*"]
5+
tags: ["monitor-app-v*"]
66
workflow_dispatch:
77
inputs:
88
tag:
@@ -50,8 +50,8 @@ jobs:
5050
with:
5151
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.name }}
5252
tags: |
53-
type=semver,pattern={{version}}
54-
type=semver,pattern={{major}}.{{minor}}
53+
type=match,pattern=monitor-app-v(\d+\.\d+\.\d+),group=1
54+
type=match,pattern=monitor-app-v(\d+\.\d+),group=1
5555
type=raw,value=latest,enable={{is_default_branch}}
5656
type=raw,value=${{ inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
5757

.github/workflows/release.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
uses: actions/setup-node@v6
2727
with:
2828
node-version: 20
29-
registry-url: 'https://registry.npmjs.org'
30-
cache: 'pnpm'
29+
registry-url: "https://registry.npmjs.org"
30+
cache: "pnpm"
3131

3232
- name: Update npm for Trusted Publishers
3333
run: npm install -g npm@latest
@@ -46,8 +46,33 @@ jobs:
4646
with:
4747
publish: pnpm release
4848
version: pnpm version-packages
49-
commit: 'chore: release packages'
50-
title: 'chore: release packages'
49+
commit: "chore: release packages"
50+
title: "chore: release packages"
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
NPM_CONFIG_PROVENANCE: true
53+
NPM_CONFIG_PROVENANCE: true
54+
55+
- name: Create SDK Git Tag
56+
if: steps.changesets.outputs.published == 'true'
57+
run: |
58+
SDK_VERSION=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[] | select(.name == "next-cwv-monitor") | .version')
59+
if [ -n "$SDK_VERSION" ]; then
60+
echo "Creating tag next-cwv-monitor-v${SDK_VERSION}"
61+
git tag "next-cwv-monitor-v${SDK_VERSION}"
62+
git push origin "next-cwv-monitor-v${SDK_VERSION}"
63+
fi
64+
65+
- name: Create Monitor App Git Tag
66+
run: |
67+
git fetch --tags
68+
69+
# Create tag for monitor-app if it doesn't exist for current version
70+
# This runs on every push to main, not just when SDK is published
71+
APP_VERSION=$(jq -r '.version' apps/monitor-app/package.json)
72+
if ! git tag -l "monitor-app-v${APP_VERSION}" | grep -q .; then
73+
echo "Creating tag monitor-app-v${APP_VERSION}"
74+
git tag "monitor-app-v${APP_VERSION}"
75+
git push origin "monitor-app-v${APP_VERSION}"
76+
else
77+
echo "Tag monitor-app-v${APP_VERSION} already exists, skipping"
78+
fi

apps/client-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cwv-monitor-client",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev -p 3001",

apps/monitor-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cwv-monitor-app",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev -p 3000",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-cwv-monitor-monorepo",
3-
"private": false,
3+
"private": true,
44
"scripts": {
55
"dev": "pnpm -r --parallel --filter \"./(apps|packages)/*\" dev",
66
"dev:client": "pnpm --parallel --filter next-cwv-monitor --filter cwv-monitor-client dev",

packages/client-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"directory": "packages/client-sdk"
2929
},
3030
"license": "MIT",
31-
"version": "0.1.0",
31+
"version": "1.0.0",
3232
"private": false,
3333
"type": "module",
3434
"sideEffects": false,

packages/cwv-monitor-contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cwv-monitor-contracts",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"private": true,
55
"type": "module",
66
"main": "src/index.ts",

0 commit comments

Comments
 (0)