Skip to content

Add workflow for build aspnet demos #3

Add workflow for build aspnet demos

Add workflow for build aspnet demos #3

Workflow file for this run

name: Build aspnet demos
concurrency:
group: wf-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
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 }}
token: ${{ secrets.NPM_TOKEN }}
- 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