Add Forgejo CI
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build on Push and create Release on Tag / build (push) Successful in 14m26s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build on Push and create Release on Tag / build (push) Successful in 14m26s
				
			This commit is contained in:
		
							parent
							
								
									b7e49b32f4
								
							
						
					
					
						commit
						150348c391
					
				
					 2 changed files with 66 additions and 0 deletions
				
			
		
							
								
								
									
										64
									
								
								.forgejo/workflows/build.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								.forgejo/workflows/build.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,64 @@ | |||
| name: Build on Push and create Release on Tag | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     tags: | ||||
|       - "v*" | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
| 
 | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
| 
 | ||||
|       - name: Setup Go | ||||
|         uses: actions/setup-go@v5 | ||||
|         with: | ||||
|           go-version: 1.24.3 | ||||
| 
 | ||||
|       - name: Setup Android NDK | ||||
|         id: setup-ndk | ||||
|         uses: https://github.com/nttld/setup-ndk@v1 | ||||
|         with: | ||||
|           ndk-version: r27c | ||||
| 
 | ||||
|       - name: Install requirements | ||||
|         run: | | ||||
|           apt-get update | ||||
|           apt-get install golang gcc libgl1-mesa-dev xorg-dev libxkbcommon-dev -y | ||||
|           go mod tidy | ||||
|           go install fyne.io/tools/cmd/fyne@latest | ||||
| 
 | ||||
|       - name: Build app | ||||
|         run: | | ||||
|           cd app | ||||
|           echo "Building for Linux" | ||||
|           fyne package -os linux | ||||
|           echo "Building for Android" | ||||
|           fyne package -os android | ||||
|         env: | ||||
|           ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | ||||
| 
 | ||||
|       - name: Move artifacts | ||||
|         run: | | ||||
|           mkdir release | ||||
|           mv app/FCaster.apk release/ | ||||
|           mv app/FCaster.tar.xz release/ | ||||
| 
 | ||||
|       - name: Upload artifacts | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           overwrite: true | ||||
|           path: release | ||||
| 
 | ||||
|       - name: Create release | ||||
|         if: github.ref_type == 'tag' | ||||
|         uses: actions/forgejo-release@v1 | ||||
|         with: | ||||
|           direction: upload | ||||
|           release-dir: release | ||||
|           token: ${{ secrets.FORGE_TOKEN }} | ||||
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,2 +1,4 @@ | |||
| *.apk | ||||
| *.tar.xz | ||||
| *.exe | ||||
| .idea | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue