Skip to content

Commit 3774fa2

Browse files
Convert Azure DevOps build pipeline to GitHub Actions workflow (#429)
* Initial plan * Add GitHub workflow to replace Azure DevOps pipeline Co-authored-by: turbobobbytraykov <3358260+turbobobbytraykov@users.noreply.github.com> * Simplify cleanup step with explanatory comment Co-authored-by: turbobobbytraykov <3358260+turbobobbytraykov@users.noreply.github.com> * Add explicit GITHUB_TOKEN permissions for security Co-authored-by: turbobobbytraykov <3358260+turbobobbytraykov@users.noreply.github.com> * Set artifact retention to 1 day and remove shouldCleanPostExecution parameter Co-authored-by: turbobobbytraykov <3358260+turbobobbytraykov@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: turbobobbytraykov <3358260+turbobobbytraykov@users.noreply.github.com>
1 parent f7083d6 commit 3774fa2

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build
2+
3+
# This workflow is meant to run on changes pushed to the vnext branch only.
4+
# If it runs on PRs, it will create PRs to the destination repos' vnext branches - we don't want that.
5+
on:
6+
push:
7+
branches:
8+
- vnext
9+
- master
10+
workflow_dispatch:
11+
inputs:
12+
isVerbose:
13+
description: 'Get verbose output from steps - where configurable'
14+
required: false
15+
type: boolean
16+
default: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
clean: true
29+
persist-credentials: true
30+
path: igniteui-angular-examples
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '20.19.0'
36+
37+
- name: Install npm dependencies
38+
run: npm install
39+
working-directory: ./igniteui-angular-examples/browser
40+
41+
- name: Apply very special configuration
42+
shell: bash
43+
run: |
44+
echo "Current directory: $(pwd)"
45+
sed -i 's/build --configuration production/build --configuration production --base-href=\/angular-demos-dv\//g' package.json
46+
working-directory: ./igniteui-angular-examples/browser
47+
48+
- name: Build project
49+
run: |
50+
if [ "${{ github.event.inputs.isVerbose }}" == "true" ]; then
51+
npm run build --verbose
52+
else
53+
npm run build
54+
fi
55+
working-directory: ./igniteui-angular-examples/browser
56+
57+
- name: Copy web.config to dist
58+
run: |
59+
cp web.config dist/browser/
60+
working-directory: ./igniteui-angular-examples/browser
61+
62+
- name: Upload build artifacts
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: dist
66+
path: ./igniteui-angular-examples/browser/dist/browser
67+
retention-days: 1

0 commit comments

Comments
 (0)