From 900a649560b1b5b18c4ebd6428d9b0721ff52735 Mon Sep 17 00:00:00 2001 From: Dylan Kelly Date: Tue, 8 Aug 2023 09:40:09 +1000 Subject: [PATCH 1/2] ci: fix Github release workflow steps ci: use from-package strategy --- .github/workflows/publish-canary.yml | 7 +++++-- .github/workflows/publish.yml | 27 +++++++++++++++++++++++---- package.json | 6 +++--- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-canary.yml b/.github/workflows/publish-canary.yml index 9aaef00624..dc791f5d9f 100644 --- a/.github/workflows/publish-canary.yml +++ b/.github/workflows/publish-canary.yml @@ -20,16 +20,19 @@ jobs: - name: Install Node uses: actions/setup-node@v3 with: + registry-url: 'https://npm.pkg.github.com' node-version: 18 cache: 'pnpm' + scope: '@dpc-sdp' - name: Install Dependencies env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 run: pnpm install --frozen-lockfile - name: Publish canary build to @next tag + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - npm config set access public - npm set //npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }} + pnpm config set access public pnpm release:publish-next --yes Update_Reference: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4f8da101a9..db169083b5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - test-release jobs: build: runs-on: ubuntu-latest @@ -23,11 +24,29 @@ jobs: contents: read steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8.6.2 + run_install: false + - name: Install Node + uses: actions/setup-node@v3 with: + registry-url: 'https://npm.pkg.github.com' node-version: 18 + cache: 'pnpm' + scope: '@dpc-sdp' + - name: Install Dependencies + env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + run: pnpm install --frozen-lockfile + - name: Create changelog and GitHub release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: pnpm run release:changelog - name: Publish semantic release + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - npm config set access public - npm set //npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }} - pnpm release:publish --yes + pnpm config set access public + pnpm run release:publish --yes diff --git a/package.json b/package.json index 12265b7e4f..520806edb0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ripple", "private": true, - "version": "2.0.0", + "version": "2.2.0", "packageManager": "pnpm@8.6.2", "license": "Apache-2.0", "repository": "https://github.com/dpc-sdp/ripple-framework", @@ -19,10 +19,10 @@ "preinstall": "npx only-allow pnpm", "release": "pnpm release:version && pnpm release:changelog", "release:version": "lerna version --force-publish --no-changelog --no-git-tag-version --no-push", - "release:changelog": "changelogen --bump && changelogen gh release", + "release:changelog": "changelogen --bump --release --push && changelogen gh release", "release:publish-alpha": "lerna publish --canary minor --preid alpha --dist-tag alpha --force-publish", "release:publish-next": "lerna publish --canary minor --preid next --dist-tag next --force-publish", - "release:publish": "lerna publish from-git", + "release:publish": "lerna publish from-package", "lint": "eslint . --ext .ts,.vue && stylelint 'packages/ripple-ui-core/**/*.css'", "test:unit": "jest --colors --runInBand", "test:components-core": "pnpm -F @dpc-sdp/ripple-ui-core test:components", From af44d7f992baadf7f09bc6d0065bdc49b0135cc6 Mon Sep 17 00:00:00 2001 From: Dylan Kelly Date: Tue, 8 Aug 2023 13:22:20 +1000 Subject: [PATCH 2/2] chore: add repository field to all packages --- package.json | 2 +- packages/eslint-config-ripple/package.json | 1 + packages/nuxt-ripple-analytics/package.json | 1 + packages/nuxt-ripple-cli/package.json | 1 + packages/nuxt-ripple-preview/package.json | 1 + packages/nuxt-ripple/package.json | 1 + packages/ripple-storybook/package.json | 1 + packages/ripple-test-utils/package.json | 1 + packages/ripple-tide-api/package.json | 1 + packages/ripple-tide-event/package.json | 1 + packages/ripple-tide-grant/package.json | 1 + packages/ripple-tide-landing-page/package.json | 1 + packages/ripple-tide-media/package.json | 1 + packages/ripple-tide-news/package.json | 1 + packages/ripple-tide-publication/package.json | 1 + packages/ripple-tide-search/package.json | 1 + packages/ripple-tide-topic/package.json | 1 + packages/ripple-ui-core/package.json | 1 + packages/ripple-ui-forms/package.json | 1 + packages/stylelint-config-ripple/package.json | 1 + 20 files changed, 20 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 520806edb0..1ccb727aa5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ripple", "private": true, - "version": "2.2.0", + "version": "2.0.0", "packageManager": "pnpm@8.6.2", "license": "Apache-2.0", "repository": "https://github.com/dpc-sdp/ripple-framework", diff --git a/packages/eslint-config-ripple/package.json b/packages/eslint-config-ripple/package.json index f22868bce0..74cc7b99d0 100644 --- a/packages/eslint-config-ripple/package.json +++ b/packages/eslint-config-ripple/package.json @@ -4,6 +4,7 @@ "description": "ESLint config for Ripple projects", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "index.js", "exports": { ".": "./index.js" diff --git a/packages/nuxt-ripple-analytics/package.json b/packages/nuxt-ripple-analytics/package.json index 238eef4067..380805ee8f 100644 --- a/packages/nuxt-ripple-analytics/package.json +++ b/packages/nuxt-ripple-analytics/package.json @@ -5,6 +5,7 @@ "version": "2.0.0", "license": "Apache-2.0", "main": "./nuxt.config.ts", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./nuxt.config.ts", "./events": "./lib/index.ts" diff --git a/packages/nuxt-ripple-cli/package.json b/packages/nuxt-ripple-cli/package.json index 0c06a23c8e..34aea0ccb1 100644 --- a/packages/nuxt-ripple-cli/package.json +++ b/packages/nuxt-ripple-cli/package.json @@ -4,6 +4,7 @@ "description": "A CLI for simplifying common setup and scaffolding tasks", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./dist/index.js", "scripts": { "nuxt-ripple": "node ./dist/commands/index.js", diff --git a/packages/nuxt-ripple-preview/package.json b/packages/nuxt-ripple-preview/package.json index 0790473ea5..fa92fb364e 100644 --- a/packages/nuxt-ripple-preview/package.json +++ b/packages/nuxt-ripple-preview/package.json @@ -5,6 +5,7 @@ "version": "2.0.0", "license": "Apache-2.0", "main": "./nuxt.config.ts", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./nuxt.config.ts", "./utils": "./utilities/index.ts", diff --git a/packages/nuxt-ripple/package.json b/packages/nuxt-ripple/package.json index b77de7c470..620366f5f4 100644 --- a/packages/nuxt-ripple/package.json +++ b/packages/nuxt-ripple/package.json @@ -5,6 +5,7 @@ "version": "2.0.0", "license": "Apache-2.0", "main": "./nuxt.config.ts", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./nuxt.config.ts", "./mapping": "./mapping/index.ts", diff --git a/packages/ripple-storybook/package.json b/packages/ripple-storybook/package.json index b5ed6f162f..3a3cfcf413 100644 --- a/packages/ripple-storybook/package.json +++ b/packages/ripple-storybook/package.json @@ -5,6 +5,7 @@ "version": "2.0.0", "license": "Apache-2.0", "private": true, + "repository": "https://github.com/dpc-sdp/ripple-framework", "scripts": { "start": "storybook dev -p 6006", "static:build": "storybook build", diff --git a/packages/ripple-test-utils/package.json b/packages/ripple-test-utils/package.json index 61d05e72ed..ddb223ddc7 100644 --- a/packages/ripple-test-utils/package.json +++ b/packages/ripple-test-utils/package.json @@ -6,6 +6,7 @@ "license": "Apache-2.0", "type": "module", "main": "./dist/config/index.js", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./dist/config/index.js", "./step_definitions": "./step_definitions/index.ts" diff --git a/packages/ripple-tide-api/package.json b/packages/ripple-tide-api/package.json index 3fbbda647c..2ce3e7583c 100644 --- a/packages/ripple-tide-api/package.json +++ b/packages/ripple-tide-api/package.json @@ -4,6 +4,7 @@ "description": "Ripple API endpoints for Tide Drupal backend", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./dist/index.js", "module": "./dist/index.js", "types": "./types.d.ts", diff --git a/packages/ripple-tide-event/package.json b/packages/ripple-tide-event/package.json index a29fedb76e..4b704ad8a9 100644 --- a/packages/ripple-tide-event/package.json +++ b/packages/ripple-tide-event/package.json @@ -5,6 +5,7 @@ "version": "2.0.0", "license": "Apache-2.0", "main": "./nuxt.config.ts", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./nuxt.config.ts", "./mapping": "./mapping/index.ts" diff --git a/packages/ripple-tide-grant/package.json b/packages/ripple-tide-grant/package.json index cd42159957..6c5d909bdd 100644 --- a/packages/ripple-tide-grant/package.json +++ b/packages/ripple-tide-grant/package.json @@ -4,6 +4,7 @@ "description": "Ripple mappings and components for Tide Grant Content type", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts", diff --git a/packages/ripple-tide-landing-page/package.json b/packages/ripple-tide-landing-page/package.json index f45a964b61..b68c4d0da4 100644 --- a/packages/ripple-tide-landing-page/package.json +++ b/packages/ripple-tide-landing-page/package.json @@ -4,6 +4,7 @@ "description": "Ripple mappings and components for Tide landing-page Content type", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts", diff --git a/packages/ripple-tide-media/package.json b/packages/ripple-tide-media/package.json index 9a7d9165a3..76e01ac324 100644 --- a/packages/ripple-tide-media/package.json +++ b/packages/ripple-tide-media/package.json @@ -4,6 +4,7 @@ "description": "Ripple mappings and components for Tide media", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts", diff --git a/packages/ripple-tide-news/package.json b/packages/ripple-tide-news/package.json index bd58e9d703..3a9743488c 100644 --- a/packages/ripple-tide-news/package.json +++ b/packages/ripple-tide-news/package.json @@ -4,6 +4,7 @@ "description": "Ripple mappings and components for Tide News content type", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts", diff --git a/packages/ripple-tide-publication/package.json b/packages/ripple-tide-publication/package.json index 34f3c0f5fc..9a2de2588e 100644 --- a/packages/ripple-tide-publication/package.json +++ b/packages/ripple-tide-publication/package.json @@ -4,6 +4,7 @@ "description": "Ripple mappings and components for Tide Publication Content type", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts", diff --git a/packages/ripple-tide-search/package.json b/packages/ripple-tide-search/package.json index 83adb491bd..8e6af42962 100644 --- a/packages/ripple-tide-search/package.json +++ b/packages/ripple-tide-search/package.json @@ -4,6 +4,7 @@ "description": "Ripple search UI and services for connecting to Tide search", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./nuxt.config.ts", "exports": { ".": "./nuxt.config.ts" diff --git a/packages/ripple-tide-topic/package.json b/packages/ripple-tide-topic/package.json index e1664a46b8..66820dbf0d 100644 --- a/packages/ripple-tide-topic/package.json +++ b/packages/ripple-tide-topic/package.json @@ -3,6 +3,7 @@ "name": "@dpc-sdp/ripple-tide-topic", "description": "Ripple mappings and components for Tide topics and tags", "main": "./nuxt.config.ts", + "repository": "https://github.com/dpc-sdp/ripple-framework", "exports": { ".": "./nuxt.config.ts", "./mapping": "./mapping/index.ts", diff --git a/packages/ripple-ui-core/package.json b/packages/ripple-ui-core/package.json index b5b508de9d..17d66e3441 100644 --- a/packages/ripple-ui-core/package.json +++ b/packages/ripple-ui-core/package.json @@ -4,6 +4,7 @@ "description": "Ripple UI Core component library", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "files": [ "dist", "src", diff --git a/packages/ripple-ui-forms/package.json b/packages/ripple-ui-forms/package.json index d025cf213b..d1d40afd62 100644 --- a/packages/ripple-ui-forms/package.json +++ b/packages/ripple-ui-forms/package.json @@ -4,6 +4,7 @@ "description": "A form component library built with Formkit", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "./dist/rpl-forms.umd.js", "module": "./dist/rpl-forms.es.js", "types": "./dist/index.d.ts", diff --git a/packages/stylelint-config-ripple/package.json b/packages/stylelint-config-ripple/package.json index 733b6c0779..9604b92063 100644 --- a/packages/stylelint-config-ripple/package.json +++ b/packages/stylelint-config-ripple/package.json @@ -4,6 +4,7 @@ "description": "ESLint config for Ripple projects", "version": "2.0.0", "license": "Apache-2.0", + "repository": "https://github.com/dpc-sdp/ripple-framework", "main": "index.js", "exports": { ".": "./index.js"