diff --git a/.github/workflows/publish-latest.yml b/.github/workflows/publish-latest.yml deleted file mode 100644 index 4beee1ba0..000000000 --- a/.github/workflows/publish-latest.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: NPM package (latest) -on: - push: - branches: [ master ] -jobs: - build: - if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension' && "contains(github.event.head_commit.message, '[latest]:')" - runs-on: ubuntu-latest - permissions: - contents: write - # For github-tag-action below - steps: - - uses: actions/checkout@v2 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v3 - with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' - # Defaults to the user or organization that owns the workflow file - scope: '@theia-ide' - - run: yarn - - run: yarn publish:latest - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - name: Push new (bumped) tag based on HEAD commit message - uses: anothrNick/github-tag-action@1.67.0 - env: - DEFAULT_BUMP: none # commit message includes #major|minor|patch - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - WITH_V: true diff --git a/.github/workflows/publish-next.yml b/.github/workflows/publish-next.yml index e98aad8f2..f9126a8fe 100644 --- a/.github/workflows/publish-next.yml +++ b/.github/workflows/publish-next.yml @@ -2,9 +2,11 @@ name: NPM package (next) on: push: branches: [ master ] +# release: +# types: [created] jobs: build: - if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension' && "!contains(github.event.head_commit.message, '[latest]:')" + if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -14,7 +16,7 @@ jobs: node-version: '16.x' registry-url: 'https://registry.npmjs.org' # Defaults to the user or organization that owns the workflow file - scope: '@theia-ide' + scope: '@theia-ide' - run: yarn - run: yarn publish:next env: diff --git a/.gitignore b/.gitignore index 140b63882..58ba72edb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ # LC_COLLATE=C sort .gitignore +!examples/*/electron-builder.yml +!examples/*/package.json +!examples/*/resources/ +!examples/*/scripts/ *.log *.tsbuildinfo .browser_modules/ @@ -8,11 +12,7 @@ /packages/react-components/lib/ TraceCompassTutorialTraces TraceCompassTutorialTraces.tgz -examples/*/gen-webpack.config.js -examples/*/lib/ -examples/*/src-gen/ -examples/electron/dist/ -examples/plugins/ +examples/* node_modules/ theia-extensions/viewer-prototype/lib/ trace-compass-server diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2853ce1a7..03142d098 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -144,54 +144,6 @@ file. Adding the SHA-1 of a commit to this file will make `git-blame` ignore tha * For GitHub, this file is automatically detected and will ignore all the commits that are included in the file. * With Git CLI, run `git blame --ignore-revs-file=.git-blame-ignore-revs ` to ignore the commits. -## Releasing a new version - -* Run either one of the below repository root commands, depending on the case at hand. -* Below, `Z` means `z+1`, and the same notation is used for `x` and `y`. - -For a release bumping the version from `x.y.z` to `x.y.Z`: - -```bash -yarn version:patch -``` - -For a release bumping the version from `x.y.z` to `x.Y.z`: - -```bash -yarn version:minor -``` - -For a release bumping the version from `x.y.z` to `X.y.z`: - -```bash -yarn version:major -``` - -Currently, [automatically adding][auto-signoff] a [Signed-off-by:][sign-off] footer to the -resulting commit message fails for this `lerna` use with `yarn`. Should one be necessary, -the commit needs to be amended accordingly, using `git commit --amend -s` or the like. - -Once pushed, reviewed then merged, the resulting commit triggers the GitHub workflow that -publishes this new release to [the npm Registry][npm-registry]. That action shall also push -the corresponding git tag. The locally created tag (internally by `lerna version`) should -then be overridable by that remote one. - -Should there be an issue with that automated workflow, the said local tag can be manually -pushed, once the commit is merged and [published as latest release][npm-registry]. If need -be, the latter step can also be done manually by running this repository root command: - -```bash -yarn && yarn publish:latest` -``` - -If needed, this is a command template to push the tag after publishing per above: - -```bash -git push origin vX.Y.Z -``` - -Where either one of `X`, `Y` or `Z` was bumped depending on the chosen case further above. - ## Contact For issues related to the Trace Viewer, please open a GitHub tracker for the [Theia Trace Extension][trace-viewer]. @@ -199,7 +151,6 @@ For issues related to the Trace Viewer, please open a GitHub tracker for the [Th For issues concerning `eclipse-cdt-cloud`, please refer to the contact options listed on the [CDT.Cloud website][cdt-cloud-website]. [architecture]: https://github.com/theia-ide/theia-trace-extension#architecture -[auto-signoff]: https://github.com/lerna/lerna/blob/main/libs/commands/version/README.md#--signoff-git-commit [cdt-cloud-website]: https://cdt-cloud.io/contact/ [code-of-conduct]: https://github.com/eclipse/.github/blob/master/CODE_OF_CONDUCT.md [commit-message-example]: https://github.com/theia-ide/theia-trace-extension/commit/bc18fcd110d7b8433293692421f2e4fb49f89bd6 @@ -220,7 +171,6 @@ For issues concerning `eclipse-cdt-cloud`, please refer to the contact options l [issue-369]: https://github.com/theia-ide/theia-trace-extension/pull/369/files [issue-402]: https://github.com/theia-ide/theia-trace-extension/pull/402 [new-contributors]: #new-contributors -[npm-registry]: https://www.npmjs.com/ [pr-guide]: #pull-request-guidelines [pull-requests]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/pulls [sign-off]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff diff --git a/package.json b/package.json index 57100100c..33adf887f 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,10 @@ "start-all:electron": "yarn start:server & yarn start:electron", "lint": "lerna run lint", "test": "lerna run test --", - "publish:latest": "lerna publish from-git --registry=https://registry.npmjs.org/ --exact --no-push --yes", + "publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --exact --no-git-tag-version --no-push", "publish:next": "lerna publish --registry=https://registry.npmjs.org/ --exact --canary minor --preid=next.$(date -u '+%Y%m%d%H%M%S').$(git rev-parse --short HEAD) --dist-tag=next --no-git-tag-version --no-push --yes", "format:write": "lerna run format:write", - "format:check": "lerna run format:check", - "version:major": "lerna version major --exact --no-push --yes -m \"[latest]: %s #major\n\nGitHub workflow shall publish and tag upon merge.\"", - "version:minor": "lerna version minor --exact --no-push --yes -m \"[latest]: %s #minor\n\nGitHub workflow shall publish and tag upon merge.\"", - "version:patch": "lerna version patch --exact --no-push --yes -m \"[latest]: %s #patch\n\nGitHub workflow shall publish and tag upon merge.\"" + "format:check": "lerna run format:check" }, "keywords": [ "theia-extension",