mirror of
				https://github.com/open-webui/desktop
				synced 2025-06-26 18:15:59 +00:00 
			
		
		
		
	Create build.yaml
This commit is contained in:
		
							parent
							
								
									fa610e6327
								
							
						
					
					
						commit
						b0fe43818a
					
				
							
								
								
									
										74
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,74 @@ | ||||
| name: Build and Release Electron Forge App | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|   pull_request: | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|     name: Build and Package | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [ubuntu-latest, windows-latest, macos-latest] | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout Repository | ||||
|         uses: actions/checkout@v4 | ||||
| 
 | ||||
|       - name: Setup Node.js | ||||
|         uses: actions/setup-node@v3 | ||||
|         with: | ||||
|           node-version: 22 | ||||
|           cache: 'npm' | ||||
| 
 | ||||
|       - name: Install Dependencies | ||||
|         run: npm ci | ||||
| 
 | ||||
|       - name: Create Builds | ||||
|         run: npm run make | ||||
| 
 | ||||
|       - name: Get Short SHA | ||||
|         id: slug | ||||
|         run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||||
| 
 | ||||
|       - name: Zip Artifacts | ||||
|         run: | | ||||
|           7z a -tzip ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }}.zip ./out/make/* | ||||
| 
 | ||||
|       - name: Upload Artifacts | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           name: ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }} | ||||
|           path: ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }}.zip | ||||
| 
 | ||||
|   release: | ||||
|     needs: build | ||||
|     runs-on: ubuntu-latest | ||||
|     if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout Repository | ||||
|         uses: actions/checkout@v4 | ||||
| 
 | ||||
|       - name: Get Short SHA | ||||
|         id: slug | ||||
|         run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||||
| 
 | ||||
|       - name: Download Artifacts | ||||
|         uses: actions/download-artifact@v3 | ||||
| 
 | ||||
|       - name: Create Release | ||||
|         id: create_release | ||||
|         uses: softprops/action-gh-release@v1 | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|         with: | ||||
|           tag_name: build-${{ steps.slug.outputs.sha8 }} | ||||
|           name: Build ${{ steps.slug.outputs.sha8 }} | ||||
|           draft: false | ||||
|           prerelease: false | ||||
|           files: | | ||||
|             ./**/*.zip | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user