Skip to content

Commit

Permalink
chore: update publish workflow and add workflow for minor/major relea…
Browse files Browse the repository at this point in the history
…ses (#6)

* chore: update publish workflow and published package READMEs

- Update publish CI workflow
  - Update trigger and only execute if CI workflow was successful
  - Use eclipse-emfcloud-bot to publish packages
- Add READMEs and keywords for published packages

Resolves GH-4

* chore: add manual workflow for minor/major releases
  • Loading branch information
ndoschek authored Oct 17, 2024
1 parent 837e855 commit e49e6f5
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 14 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/publish-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Publish ModelHub Packages

on:
workflow_dispatch:
workflow_run:
workflows: ['CI']
types: [completed]
branches: [main]

permissions:
contents: write
Expand All @@ -12,6 +15,7 @@ jobs:
verify-and-publish:
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -42,13 +46,6 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build example applications
run: |
yarn browser build
yarn electron build
env:
NODE_OPTIONS: --max_old_space_size=4096

- name: Lint with ESLint
run: yarn lint

Expand All @@ -59,8 +56,8 @@ jobs:
# Scripts are ignored because we build and lint before this step
- name: Publish packages
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config user.email 'eclipse-emfcloud-bot@eclipse.org'
git config user.name 'eclipse-emfcloud-bot'
yarn lerna publish -y --ignore-scripts --loglevel=verbose
env:
NPM_CONFIG_PROVENANCE: 'true'
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release ModelHub Packages

on:
workflow_dispatch:
inputs:
version-type:
description: 'Version type to release (minor or major)'
required: true
default: 'minor'
type: choice
options:
- minor
- major

permissions:
contents: write
packages: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout Repository
uses: actions/checkout@v4.2.0
with:
fetch-depth: 0 # pulls all history and tags for Lerna to detect which packages changed

- name: Setup Node 20
uses: actions/setup-node@v4.0.4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install tools and libraries
run: sudo apt-get install -y build-essential libx11-dev libxkbfile-dev libsecret-1-dev

- name: Use Python 3.11
uses: actions/setup-python@v5.2.0
with:
python-version: '3.11'

- name: Install and Build
shell: bash
run: |
yarn global add node-gyp
yarn --skip-integrity-check --network-timeout 100000
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint with ESLint
run: yarn lint

- name: Run tests
run: yarn test

- name: Determine Version Type
id: version_type
run: echo "VERSION_TYPE=${{ github.event.inputs['version-type'] }}" >> $GITHUB_ENV

- name: Publish packages
run: |
git config user.email 'eclipse-emfcloud-bot@eclipse.org'
git config user.name 'eclipse-emfcloud-bot'
# Using the chosen version type (minor or major) for Lerna publish
yarn lerna version $VERSION_TYPE -y --ignore-scripts --loglevel=verbose --message "chore(release): publish ModelHub $VERSION_TYPE version"
yarn lerna publish from-package -y --ignore-scripts --loglevel=verbose
env:
NPM_CONFIG_PROVENANCE: 'true'
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
19 changes: 19 additions & 0 deletions ext/model-service-theia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Eclipse EMF Cloud Model Service for Eclipse Theia Applications

Model Service for Eclipse Theia is a versatile solution designed to enhance Eclipse Theia applications by providing model management and interaction capabilities.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
6 changes: 6 additions & 0 deletions ext/model-service-theia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@eclipse-emfcloud/model-service-theia",
"version": "1.2.1",
"description": "Model service Theia",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down
18 changes: 17 additions & 1 deletion npm/model-accessor-bus/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Model Accessor Bus
# Eclipse EMF Cloud Model Accessor Bus

The _Model Accessor Bus_ is an API allowing the retrieval of data coming from "models" primarily targeting JSON documents.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
6 changes: 6 additions & 0 deletions npm/model-accessor-bus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@eclipse-emfcloud/model-accessor-bus",
"version": "1.0.1",
"description": "Model data access interface.",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down
18 changes: 17 additions & 1 deletion npm/model-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Model Manager
# Eclipse EMF Cloud Model Manager

The _Model Manager_ is an API for command-based editing, with undo/redo, of "models" primarily targeting JSON documents.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
6 changes: 6 additions & 0 deletions npm/model-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@eclipse-emfcloud/model-manager",
"version": "1.0.1",
"description": "Command-based model editing with undo/redo.",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down
19 changes: 19 additions & 0 deletions npm/model-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Eclipse EMF Cloud Model Service

Model Service provides a framework for model management.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
6 changes: 6 additions & 0 deletions npm/model-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@eclipse-emfcloud/model-service",
"version": "1.0.1",
"description": "Model service framework",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down
18 changes: 17 additions & 1 deletion npm/model-validation/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Model Validation
# Eclipse EMF Cloud Model Validation

The _Model Validation_ package is an API for validation of models, where "models" primarily are JSON documents.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
7 changes: 7 additions & 0 deletions npm/model-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "@eclipse-emfcloud/model-validation",
"version": "1.0.1",
"description": "Generic model validation framework.",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management",
"validation"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down
18 changes: 17 additions & 1 deletion npm/trigger-engine/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Trigger Engine
# Eclipse EMF Cloud Trigger Engine

The _Trigger Engine_ package is an API for computing follow-up changes to be applied to JSON documents after application of patches, to proactively ensure data integrity.

For more information, please visit the [EMF Cloud Website](https://www.eclipse.org/emfcloud/).
If you have questions, contact us on our [discussions page](https://github.com/eclipse-emfcloud/emfcloud/discussions)
and have a look at our [communication and support options](https://www.eclipse.org/emfcloud/contact/).

## License

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
<http://www.eclipse.org/legal/epl-2.0>.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License v. 2.0 are satisfied: MIT.

SPDX-License-Identifier: EPL-2.0 OR MIT
6 changes: 6 additions & 0 deletions npm/trigger-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@eclipse-emfcloud/trigger-engine",
"version": "1.0.1",
"description": "Generic model triggers computation engine.",
"keywords": [
"theia-extension",
"eclipse",
"emfcloud",
"model-management"
],
"license": "(EPL-2.0 OR MIT)",
"contributors": [
{
Expand Down

0 comments on commit e49e6f5

Please sign in to comment.