Skip to content

New version 4.13.20 Read more https://github.com/xdan/jodit/blob/main… #393

New version 4.13.20 Read more https://github.com/xdan/jodit/blob/main…

New version 4.13.20 Read more https://github.com/xdan/jodit/blob/main… #393

Workflow file for this run

name: Publish Package to npmjs
on:
repository_dispatch:
types: [release]
push:
tags: ['*']
permissions:
id-token: write # Required for OIDC
contents: write
pull-requests: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
# OIDC trusted publishing needs npm >= 11.5.1 (Node's bundled npm is
# too old → ENEEDAUTH), but `npm@latest` is 12.0.0, a broken release
# whose `sigstore` module is missing and crashes `npm publish`. Pin
# to the last known-good 11.6.4 (has OIDC support + working sigstore).
- name: Install npm with OIDC + working sigstore
run: npm install -g npm@11.6.4
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: build
path: build/
- name: Publish
run: npm publish ./build
- name: Extract changelog for version
id: changelog
run: |
VERSION=$(node -p "require('./package.json').version")
NOTES=$(awk "/^## ${VERSION}\$/{flag=1; next} /^## [0-9]/{flag=0} flag" CHANGELOG.md)
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.changelog.outputs.NOTES }}
- 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: |
echo "Trigger release React package" >> $GITHUB_STEP_SUMMARY
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: |
echo "Trigger update PRO version" >> $GITHUB_STEP_SUMMARY
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" }'