diff --git a/.github/workflows/build-aspnet.yml b/.github/workflows/build-aspnet.yml new file mode 100644 index 00000000000..28adc7c1f38 --- /dev/null +++ b/.github/workflows/build-aspnet.yml @@ -0,0 +1,52 @@ +name: Build aspnet demos + +concurrency: + group: wf-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +on: + pull_request: + workflow_dispatch: + push: + branches: + - "[0-9][0-9]_[0-9]" + +jobs: + build: + name: Build aspnet demos + runs-on: windows-2019 + + steps: + - name: Get sources + uses: actions/checkout@v4 + + - name: Get version + id: get_version + run: | + $env:version=$(node -p -e "require('./package.json').version.slice(0, 4).replace('.', '_')") + echo "version=$env:version" >> $GITHUB_OUTPUT + + - name: Clone devextreme-aspnet repo + uses: actions/checkout@v4 + with: + repository: DevExpress/devextreme-aspnet + ref: ${{ steps.get_version.outputs.version }} + path: devextreme-aspnet + token: ${{ secrets.ASPNET_PAT }} + + - name: Restore npm cache + uses: actions/cache@v3 + with: + path: ./node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} + + - name: Run npm install + run: npm install --no-audit --no-fund + + - name: Update repository.config.json + run: | + jq '."devextreme" = "${{ github.workspace }}\\DevExtreme" | ."devextreme-aspnet" = "${{ github.workspace }}\\devextreme-aspnet"' repository.config.json > temp.json + mv temp.json repository.config.json + + - name: Build demos + run: npm run prepare-aspnet