Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: move to release-please for publishing #722

Merged
merged 5 commits into from Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 87 additions & 0 deletions .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
4 changes: 0 additions & 4 deletions lerna.json

This file was deleted.

27 changes: 2 additions & 25 deletions package.json
Expand Up @@ -40,14 +40,15 @@
"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": {
"better-than-before": "^1.0.0",
"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",
Expand All @@ -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",
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/conventional-changelog-cli/package.json
Expand Up @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions packages/conventional-changelog-core/package.json
Expand Up @@ -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",
Expand All @@ -44,5 +44,8 @@
},
"scripts": {
"test-windows": "mocha --timeout 30000"
},
"devDependencies": {
"conventional-changelog-angular": "^5.0.12"
}
}
1 change: 1 addition & 0 deletions packages/conventional-changelog-preset-loader/package.json
Expand Up @@ -26,6 +26,7 @@
"test-windows": "mocha --timeout 30000"
},
"devDependencies": {
"conventional-changelog-angular": "^5.0.12",
"sinon": "^9.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/conventional-changelog-writer/package.json
Expand Up @@ -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",
Expand Down
22 changes: 11 additions & 11 deletions packages/conventional-changelog/package.json
Expand Up @@ -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"
Expand Down
13 changes: 8 additions & 5 deletions packages/conventional-recommended-bump/package.json
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/gulp-conventional-changelog/package.json
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/standard-changelog/package.json
Expand Up @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions renovate.json

This file was deleted.

8 changes: 8 additions & 0 deletions 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