Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into websocket-watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
sBouzols committed Nov 22, 2024
2 parents 3115be7 + 59e7c10 commit b29e20e
Show file tree
Hide file tree
Showing 74 changed files with 1,891 additions and 335 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/publish.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
workflow_dispatch:
inputs:
versionType:
description: version type increment
required: true
type: choice
options:
- major
- minor
- patch

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
name: Generate app token
with:
app-id: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
private-key: ${{ secrets.GRIDSUITE_ACTIONS_SECRET }}

- name: Checkout sources
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}

- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Add release commit and publish
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
npm version ${{ github.event.inputs.versionType }}
git push origin main
git push origin $(git tag --points-at HEAD)
npm install
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub release
run: |
gh release create $(git tag --points-at HEAD) --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,10 @@ To fix this, run this command from the app **after** running "npm install"
If you want to deploy a new version of commons-ui in the [NPM package registry](https://www.npmjs.com/package/@gridsuite/commons-ui),
you need to follow the steps below:

- Update to the new version in [package.json](https://github.com/gridsuite/commons-ui/blob/main/package.json) (example `0.6.0`)
- Build it: `npm install`
- Commit the package.json and package-lock.json files, push to a branch, make a PR, have it reviewed and merged to main.
- [Make a release](https://github.com/gridsuite/commons-ui/releases/new) on GitHub by creating a new tag on the last commit. On the release creation page:
- In "Choose a tag": type the tag you want to create (ex.: v0.6.0) and select "create new tag"
- In "Target": click on "recent commit" tab and select your release commit
- Click on "Generate release note"
- Click on "Publish release"
- It will trigger a job that will publish the release on NPM
- [Make a release action](https://github.com/gridsuite/commons-ui/actions/workflows/release.yml)
- In the 'run workflow' combobox select, let the branch on main
- Enter the type of evolution (major | minor | patch)
- Click 'run workflow'

#### License Headers and dependencies checking

Expand Down
4 changes: 4 additions & 0 deletions demo/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ import {
useSnackMessage,
commonButtonEn,
commonButtonFr,
networkModificationsEn,
networkModificationsFr,
} from '../../src';

const messages = {
Expand All @@ -127,6 +129,7 @@ const messages = {
...flatParametersEn,
...multipleSelectionDialogEn,
...commonButtonEn,
...networkModificationsEn,
...inputsEn,
...translations.en,
},
Expand All @@ -146,6 +149,7 @@ const messages = {
...cardErrorBoundaryFr,
...flatParametersFr,
...commonButtonFr,
...networkModificationsFr,
...multipleSelectionDialogFr,
...inputsFr,
...translations.fr,
Expand Down
3 changes: 2 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const config: Config = {
globals: {
IS_REACT_ACT_ENVIRONMENT: true,
},
setupFiles: ['<rootDir>/jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['<rootDir>/src/tests/testsUtils.test.tsx'],
};

export default config;
1 change: 1 addition & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import '@testing-library/jest-dom'
import { TextEncoder, TextDecoder } from 'util';

// fix for ReferenceError: TextDecoder / TextEncoder is not defined
Expand Down
Loading

0 comments on commit b29e20e

Please sign in to comment.