Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for build aspnet demos #2820

Closed
wants to merge 21 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build-aspnet.yml
Original file line number Diff line number Diff line change
@@ -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
Loading