New version 4.9.1 Read more https://github.com/xdan/jodit/blob/main/C… #291
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Package to npmjs | |
| on: | |
| repository_dispatch: | |
| types: [ release ] | |
| push: | |
| tags: ["*"] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Lint | |
| run: make lint | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Build | |
| run: make build-all | |
| - name: Check ESM build | |
| run: make check-esm-build pluginsCount=63 | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: build/ | |
| retention-days: 1 | |
| test: | |
| name: Test (${{ matrix.build }}) | |
| runs-on: ubuntu-latest | |
| needs: [lint, build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - build: esm | |
| uglify: false | |
| fat: false | |
| - build: es2021 | |
| uglify: true | |
| fat: true | |
| - build: es2018 | |
| uglify: true | |
| fat: true | |
| - build: es2015 | |
| uglify: true | |
| fat: true | |
| - build: es5 | |
| uglify: true | |
| fat: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: build/ | |
| - name: Test ${{ matrix.build }} | |
| run: make test-only-run build=${{ matrix.build }} uglify=${{ matrix.uglify }} fat=${{ matrix.fat }} | |
| publish: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: build/ | |
| - name: Publish | |
| run: NPM_TOKEN=${{ secrets.NPM_TOKEN }} npm publish ./build --access public | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| generate_release_notes: true | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Show new version | |
| run: | | |
| VERSION=${{ steps.get_version.outputs.version }} | |
| PACKAGE_NAME="jodit" | |
| echo "[New version npm](https://www.npmjs.com/package/${PACKAGE_NAME}/v/${VERSION})" >> $GITHUB_STEP_SUMMARY | |
| notify: | |
| name: Trigger Downstream | |
| runs-on: ubuntu-latest | |
| needs: publish | |
| steps: | |
| - name: Trigger generate site hook | |
| run: | | |
| curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/xdan/jodit-pro-home/dispatches --data '{"event_type": "opened" }' | |
| - name: Trigger release React package | |
| run: | | |
| curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/jodit/jodit-react/dispatches --data '{"event_type": "newversion" }' | |
| - name: Trigger startup update version | |
| run: | | |
| curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/xdan/jodit-startup-service/dispatches --data '{"event_type": "newversion" }' | |
| - name: Trigger update PRO version | |
| run: | | |
| curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/jodit/jodit-pro/dispatches --data '{"event_type": "newversion" }' |