@@ -3,24 +3,10 @@ permissions:
33 contents : read
44
55on :
6- workflow_dispatch :
7- inputs :
8- branch :
9- description : ' Branch to build from'
10- required : true
11- default : ' master'
12- type : choice
13- options :
14- - master
15- build_type :
16- description : ' Build type'
17- required : true
18- default : ' both'
19- type : choice
20- options :
21- - debug
22- - production
23- - both
6+ push :
7+ branches : [ master ]
8+ paths :
9+ - ' RemoteLogViewer.WinUI/Assets/Web/**'
2410
2511jobs :
2612 build-web-assets :
2915 steps :
3016 - name : Checkout repository
3117 uses : actions/checkout@v4
32- with :
33- ref : ${{ github.event.inputs.branch }}
3418
3519 - name : Setup Node.js
3620 uses : actions/setup-node@v4
@@ -45,29 +29,25 @@ jobs:
4529 timeout-minutes : 10
4630
4731 - name : Build for Debug
48- if : ${{ github.event.inputs.build_type == 'debug' || github.event.inputs.build_type == 'both' }}
4932 working-directory : RemoteLogViewer.WinUI/Assets/Web
5033 run : npm run build:dev
5134 timeout-minutes : 10
5235
5336 - name : Upload Debug Web Assets
54- if : ${{ github.event.inputs.build_type == 'debug' || github.event.inputs.build_type == 'both' }}
5537 uses : actions/upload-artifact@v4
5638 with :
57- name : web-assets-debug-${{ github.event.inputs.branch }}-${{ github.sha }}
39+ name : web-assets-debug-${{ github.ref_name }}-${{ github.sha }}
5840 path : RemoteLogViewer.WinUI/Assets/Web/dist/
5941 retention-days : 30
6042
6143 - name : Build for Production
62- if : ${{ github.event.inputs.build_type == 'production' || github.event.inputs.build_type == 'both' }}
6344 working-directory : RemoteLogViewer.WinUI/Assets/Web
6445 run : npm run build
6546 timeout-minutes : 10
6647
6748 - name : Upload Production Web Assets
68- if : ${{ github.event.inputs.build_type == 'production' || github.event.inputs.build_type == 'both' }}
6949 uses : actions/upload-artifact@v4
7050 with :
71- name : web-assets-production-${{ github.event.inputs.branch }}-${{ github.sha }}
51+ name : web-assets-production-${{ github.ref_name }}-${{ github.sha }}
7252 path : RemoteLogViewer.WinUI/Assets/Web/dist/
7353 retention-days : 30
0 commit comments