From 15d5fd85d750908c27366c8f944f82bcbaf9bf4c Mon Sep 17 00:00:00 2001 From: dmlvr Date: Tue, 14 Oct 2025 10:44:31 +0300 Subject: [PATCH] update ci --- .github/actions/build/action.yml | 62 ++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 6 ++-- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 .github/actions/build/action.yml diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml new file mode 100644 index 000000000..c09e950eb --- /dev/null +++ b/.github/actions/build/action.yml @@ -0,0 +1,62 @@ +name: 'Build devextreme-exceljs-fork' +author: 'Developer Express Inc.' + +inputs: + node-version: + description: 'Node.js version to use for building' + required: false + default: '18' + clean-build: + description: 'Whether to clean before building' + required: false + default: 'true' + +outputs: + build-status: + description: 'Status of the build process' + value: ${{ steps.build.outputs.status }} + +runs: + using: 'composite' + steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: 'npm' + + - name: Install dependencies + shell: bash + run: npm ci + + - name: Clean previous build + if: ${{ inputs.clean-build == 'true' }} + shell: bash + run: npm run clean + + - name: Build package + id: build + shell: bash + run: | + echo "Starting build process..." + npm run build + echo "status=success" >> $GITHUB_OUTPUT + echo "Build completed successfully" + + - name: Verify build artifacts + shell: bash + run: | + echo "Verifying build artifacts..." + if [ ! -d "dist" ]; then + echo "Error: dist directory not found" + exit 1 + fi + if [ ! -f "dist/dx-exceljs-fork.min.js" ]; then + echo "Error: minified bundle not found" + exit 1 + fi + if [ ! -f "dist/dx-exceljs-fork.js" ]; then + echo "Error: main bundle not found" + exit 1 + fi + echo "All build artifacts verified successfully" \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index af2f984c9..6102d8692 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,13 +12,13 @@ jobs: publish: runs-on: ubuntu-latest steps: - - name: Checkout ExcelJS repository + - name: Checkout devextreme-exceljs-fork repository uses: actions/checkout@v4 with: ref: ${{ inputs.version }} - name: Build - uses: ./.github/actions/exceljs/steps/build + uses: ./.github/actions/build - uses: actions/setup-node@v4 with: @@ -34,4 +34,4 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - npm dist-tag add exceljs@${{ inputs.version }} 25_1 + npm dist-tag add devextreme-exceljs-fork@${{ inputs.version }} 25_1