From db736b60a22a296e9752b8af21388666cdc265e1 Mon Sep 17 00:00:00 2001 From: dmlvr Date: Tue, 14 Oct 2025 15:02:07 +0300 Subject: [PATCH] update publich workflow --- .github/actions/build/action.yml | 62 -------------------------------- .github/workflows/publish.yml | 41 ++++++++++++++++----- 2 files changed, 32 insertions(+), 71 deletions(-) delete mode 100644 .github/actions/build/action.yml diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml deleted file mode 100644 index c09e950eb..000000000 --- a/.github/actions/build/action.yml +++ /dev/null @@ -1,62 +0,0 @@ -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 6102d8692..72bad37ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,8 +17,37 @@ jobs: with: ref: ${{ inputs.version }} - - name: Build - uses: ./.github/actions/build + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Clean previous build + run: npm run clean + + - name: Build package + run: npm run build + + - name: Verify build artifacts + 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" - uses: actions/setup-node@v4 with: @@ -28,10 +57,4 @@ jobs: - name: Publish to NPM env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm publish --access=public - - - name: Setup NPM tags - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - npm dist-tag add devextreme-exceljs-fork@${{ inputs.version }} 25_1 + run: npm publish