diff --git a/.github/workflows/release-submodules.yaml b/.github/workflows/release-submodules.yaml new file mode 100644 index 000000000..f7baeb5b2 --- /dev/null +++ b/.github/workflows/release-submodules.yaml @@ -0,0 +1,87 @@ +on: + push: + branches: + - master +name: release-please-submodule +jobs: + changeFinder: + runs-on: ubuntu-latest + outputs: + nodePaths: ${{ steps.interrogate.outputs.nodePaths }} + steps: + - uses: actions/checkout@v2 + - id: interrogate + uses: actions/github-script@v3 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const {execSync} = require('child_process'); + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + const latestRelease = await github.repos.getLatestRelease({ + owner, + repo + }); + console.log(`latest release: ${JSON.stringify(latestRelease.data)}`); + execSync('git pull --tags'); + execSync(`git reset --hard ${latestRelease.data.tag_name}`); + const status = execSync(`git diff --name-only origin/master`, { encoding: 'utf-8'}); + console.log(status); + const changes = status.split('\n'); + let nodePaths = new Set(); + for (const change of changes) { + if (change.startsWith('packages/')) { + const library = change.split('/')[1]; + nodePaths.add(library); + }; + } + nodePaths = Array.from(nodePaths); + console.log(`::set-output name=nodePaths::${JSON.stringify(nodePaths)}`); + release-pr: + runs-on: ubuntu-latest + needs: changeFinder + strategy: + fail-fast: false + matrix: + package: ${{fromJson(needs.changeFinder.outputs.nodePaths)}} + steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release-please + with: + path: packages/${{ matrix.package }} + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: ${{ matrix.package }} + monorepo-tags: true + command: release-pr + release-please-release: + runs-on: ubuntu-latest + needs: changeFinder + strategy: + fail-fast: false + matrix: + package: ${{fromJson(needs.changeFinder.outputs.nodePaths)}} + steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + id: tag-release + with: + path: packages/${{ matrix.package }} + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + monorepo-tags: true + package-name: ${{ matrix.package }} + command: github-release + - uses: actions/checkout@v2 + if: ${{ steps.tag-release.outputs.release_created }} + - uses: actions/setup-node@v1 + if: ${{ steps.tag-release.outputs.release_created }} + with: + node-version: 14 + registry-url: 'https://wombat-dressing-room.appspot.com/' + - name: publish + if: ${{ steps.tag-release.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: | + cd src/apis/${{ matrix.package }} + npm install + npm publish --access=public diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 7926728a6..000000000 --- a/lerna.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "packages": ["packages/*"], - "version": "independent" -} diff --git a/package.json b/package.json index f54b09f9e..4484bd403 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "pretest": "npm run lint", "test": "c8 mocha --timeout 30000 packages/*/test{,/*}.js", "test-windows": "c8 mocha --timeout 60000 packages/*/test{,/*}.js", - "release": "lerna publish --conventional-commits --dist-tag=next" + "postinstall": "bash scripts/install.sh" }, "version": "1.0.0", "devDependencies": { @@ -48,6 +48,7 @@ "c8": "^7.1.2", "chai": "^4.2.0", "concat-stream": "^2.0.0", + "conventional-changelog-core": "^4.2.1", "coveralls": "^3.0.2", "eslint": "^7.0.0", "eslint-config-standard": "^16.0.1", @@ -58,7 +59,6 @@ "forceable-tty": "^0.1.0", "git-dummy-commit": "^1.2.0", "git-tails": "^1.0.0", - "lerna": "^3.20.2", "mkdirp": "^1.0.0", "mocha": "^8.0.0", "pinkie-promise": "^2.0.0", @@ -72,28 +72,5 @@ "through2": "^4.0.0", "tmp": "^0.2.1", "vinyl": "^2.1.0" - }, - "dependencies": { - "conventional-changelog": "file:packages/conventional-changelog", - "conventional-changelog-angular": "file:packages/conventional-changelog-angular", - "conventional-changelog-atom": "file:packages/conventional-changelog-atom", - "conventional-changelog-cli": "file:packages/conventional-changelog-cli", - "conventional-changelog-codemirror": "file:packages/conventional-changelog-codemirror", - "conventional-changelog-conventionalcommits": "file:packages/conventional-changelog-conventionalcommits", - "conventional-changelog-core": "file:packages/conventional-changelog-core", - "conventional-changelog-ember": "file:packages/conventional-changelog-ember", - "conventional-changelog-eslint": "file:packages/conventional-changelog-eslint", - "conventional-changelog-express": "file:packages/conventional-changelog-express", - "conventional-changelog-jquery": "file:packages/conventional-changelog-jquery", - "conventional-changelog-jshint": "file:packages/conventional-changelog-jshint", - "conventional-changelog-preset-loader": "file:packages/conventional-changelog-preset-loader", - "conventional-changelog-writer": "file:packages/conventional-changelog-writer", - "conventional-commits-filter": "file:packages/conventional-commits-filter", - "conventional-commits-parser": "file:packages/conventional-commits-parser", - "conventional-recommended-bump": "file:packages/conventional-recommended-bump", - "git-raw-commits": "file:packages/git-raw-commits", - "git-semver-tags": "file:packages/git-semver-tags", - "gulp-conventional-changelog": "file:packages/gulp-conventional-changelog", - "standard-changelog": "file:packages/standard-changelog" } } diff --git a/packages/conventional-changelog-cli/package.json b/packages/conventional-changelog-cli/package.json index a2b41032f..3c7b6a3da 100644 --- a/packages/conventional-changelog-cli/package.json +++ b/packages/conventional-changelog-cli/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "add-stream": "^1.0.0", - "conventional-changelog": "file:../conventional-changelog", + "conventional-changelog": "^3.1.24", "lodash": "^4.17.15", "meow": "^8.0.0", "tempfile": "^3.0.0" diff --git a/packages/conventional-changelog-core/package.json b/packages/conventional-changelog-core/package.json index ce8ea530c..9c999c662 100644 --- a/packages/conventional-changelog-core/package.json +++ b/packages/conventional-changelog-core/package.json @@ -27,13 +27,13 @@ "homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#readme", "dependencies": { "add-stream": "^1.0.0", - "conventional-changelog-writer": "file:../conventional-changelog-writer", - "conventional-commits-parser": "file:../conventional-commits-parser", + "conventional-changelog-writer": "^4.0.18", + "conventional-commits-parser": "^3.2.0", "dateformat": "^3.0.0", "get-pkg-repo": "^1.0.0", "git-raw-commits": "2.0.0", "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "file:../git-semver-tags", + "git-semver-tags": "^4.1.1", "lodash": "^4.17.15", "normalize-package-data": "^3.0.0", "q": "^1.5.1", @@ -44,5 +44,8 @@ }, "scripts": { "test-windows": "mocha --timeout 30000" + }, + "devDependencies": { + "conventional-changelog-angular": "^5.0.12" } } diff --git a/packages/conventional-changelog-preset-loader/package.json b/packages/conventional-changelog-preset-loader/package.json index 394fbfb93..82972e774 100644 --- a/packages/conventional-changelog-preset-loader/package.json +++ b/packages/conventional-changelog-preset-loader/package.json @@ -26,6 +26,7 @@ "test-windows": "mocha --timeout 30000" }, "devDependencies": { + "conventional-changelog-angular": "^5.0.12", "sinon": "^9.0.2" } } diff --git a/packages/conventional-changelog-writer/package.json b/packages/conventional-changelog-writer/package.json index f366591e9..b35f140c1 100644 --- a/packages/conventional-changelog-writer/package.json +++ b/packages/conventional-changelog-writer/package.json @@ -37,7 +37,7 @@ ], "dependencies": { "compare-func": "^2.0.0", - "conventional-commits-filter": "file:../conventional-commits-filter", + "conventional-commits-filter": "^2.0.7", "dateformat": "^3.0.0", "handlebars": "^4.7.6", "json-stringify-safe": "^5.0.1", diff --git a/packages/conventional-changelog/package.json b/packages/conventional-changelog/package.json index b3feb4c9f..7ba770f34 100644 --- a/packages/conventional-changelog/package.json +++ b/packages/conventional-changelog/package.json @@ -35,17 +35,17 @@ }, "homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog#readme", "dependencies": { - "conventional-changelog-angular": "file:../conventional-changelog-angular", - "conventional-changelog-atom": "file:../conventional-changelog-atom", - "conventional-changelog-codemirror": "file:../conventional-changelog-codemirror", - "conventional-changelog-conventionalcommits": "file:../conventional-changelog-conventionalcommits", - "conventional-changelog-core": "file:../conventional-changelog-core", - "conventional-changelog-ember": "file:../conventional-changelog-ember", - "conventional-changelog-eslint": "file:../conventional-changelog-eslint", - "conventional-changelog-express": "file:../conventional-changelog-express", - "conventional-changelog-jquery": "file:../conventional-changelog-jquery", - "conventional-changelog-jshint": "file:../conventional-changelog-jshint", - "conventional-changelog-preset-loader": "file:../conventional-changelog-preset-loader" + "conventional-changelog-angular": "^5.0.12", + "conventional-changelog-atom": "^2.0.8", + "conventional-changelog-codemirror": "^2.0.8", + "conventional-changelog-conventionalcommits": "^4.5.0", + "conventional-changelog-core": "^4.2.1", + "conventional-changelog-ember": "^2.0.9", + "conventional-changelog-eslint": "^3.0.9", + "conventional-changelog-express": "^2.0.6", + "conventional-changelog-jquery": "^3.0.11", + "conventional-changelog-jshint": "^2.0.9", + "conventional-changelog-preset-loader": "^2.3.4" }, "scripts": { "test-windows": "mocha --timeout 30000" diff --git a/packages/conventional-recommended-bump/package.json b/packages/conventional-recommended-bump/package.json index 2fbdee468..9467db0ef 100644 --- a/packages/conventional-recommended-bump/package.json +++ b/packages/conventional-recommended-bump/package.json @@ -32,16 +32,19 @@ ], "dependencies": { "concat-stream": "^2.0.0", - "conventional-changelog-preset-loader": "file:../conventional-changelog-preset-loader", - "conventional-commits-filter": "file:../conventional-commits-filter", - "conventional-commits-parser": "file:../conventional-commits-parser", + "conventional-changelog-preset-loader": "^2.3.4", + "conventional-commits-filter": "^2.0.7", + "conventional-commits-parser": "^3.2.0", "git-raw-commits": "2.0.0", - "git-semver-tags": "file:../git-semver-tags", + "git-semver-tags": "^4.1.1", "meow": "^8.0.0", "q": "^1.5.1" }, "scripts": { "test-windows": "mocha --timeout 30000 ./test/preset-resolver.spec.js" }, - "bin": "cli.js" + "bin": "cli.js", + "devDependencies": { + "conventional-changelog-conventionalcommits": "^4.5.0" + } } diff --git a/packages/gulp-conventional-changelog/package.json b/packages/gulp-conventional-changelog/package.json index e7fd1f4c8..cbeb6151a 100644 --- a/packages/gulp-conventional-changelog/package.json +++ b/packages/gulp-conventional-changelog/package.json @@ -35,7 +35,7 @@ "dependencies": { "add-stream": "^1.0.0", "concat-stream": "^2.0.0", - "conventional-changelog": "file:../conventional-changelog", + "conventional-changelog": "^3.1.24", "fancy-log": "^1.3.2", "object-assign": "^4.0.1", "plugin-error": "^1.0.1", diff --git a/packages/standard-changelog/package.json b/packages/standard-changelog/package.json index ba41e47f6..2cfa4f55a 100644 --- a/packages/standard-changelog/package.json +++ b/packages/standard-changelog/package.json @@ -28,8 +28,8 @@ "dependencies": { "add-stream": "^1.0.0", "chalk": "^4.0.0", - "conventional-changelog-angular": "file:../conventional-changelog-angular", - "conventional-changelog-core": "file:../conventional-changelog-core", + "conventional-changelog-angular": "^5.0.12", + "conventional-changelog-core": "^4.2.1", "figures": "^3.0.0", "fs-access": "^1.0.0", "lodash": "^4.17.15", diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 99c8dedf0..000000000 --- a/renovate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "lockFileMaintenance": { "enabled": false } -} diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 000000000..b7652e819 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +for d in ./packages/* ; do + echo "installing deps for $d" + cd $d + npm i + cd ../../ +done