| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  | name: TEST_release_info
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | on:
 | 
					
						
							|  |  |  |   push:
 | 
					
						
							|  |  |  |     branches:
 | 
					
						
							|  |  |  |      - main
 | 
					
						
							|  |  |  |     paths:
 | 
					
						
							|  |  |  |       - .github/workflows/TEST_release_info.yml
 | 
					
						
							|  |  |  |   pull_request: 
 | 
					
						
							|  |  |  |     branches:
 | 
					
						
							|  |  |  |      - main
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   workflow_dispatch:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | jobs:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Building_RetroDECK:
 | 
					
						
							|  |  |  |     runs-on: ubuntu-latest
 | 
					
						
							|  |  |  |     steps:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       - name: Generate build ID
 | 
					
						
							|  |  |  |         id: generating_buildid
 | 
					
						
							|  |  |  |         run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")"
 | 
					
						
							|  |  |  |       
 | 
					
						
							|  |  |  |       - uses: actions/checkout@v3
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       - name: Initialize enviornment
 | 
					
						
							|  |  |  |         run: |
 | 
					
						
							|  |  |  |           git pull
 | 
					
						
							|  |  |  |           git submodule init
 | 
					
						
							|  |  |  |           git submodule update
 | 
					
						
							| 
									
										
										
										
											2023-03-24 11:14:46 +00:00
										 |  |  |           sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet appstream-util
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-24 11:11:00 +00:00
										 |  |  |       - name: Validating the appdata
 | 
					
						
							|  |  |  |         run: appstream-util validate "net.retrodeck.retrodeck.appdata.xml"
 | 
					
						
							|  |  |  |         continue-on-error: true
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  |       - name: Getting version info
 | 
					
						
							|  |  |  |         id: version
 | 
					
						
							|  |  |  |         run: |
 | 
					
						
							| 
									
										
										
										
											2024-08-01 15:57:19 +00:00
										 |  |  |           appdata="https://raw.githubusercontent.com/RetroDECK/RetroDECK/main/net.retrodeck.retrodeck.appdata.xml"
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:50:47 +00:00
										 |  |  |           REL_VER=$(curl -s $appdata | xmlstarlet sel -t -v "//release/@version" | head -1)
 | 
					
						
							| 
									
										
										
										
											2023-03-17 16:52:44 +00:00
										 |  |  |           DES="$(curl -s $appdata | xmlstarlet sel -t -m "//release[1]" -v "description" -n | sed '1,2d;$d;s/^ */- /;/^- $/d')"
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:50:47 +00:00
										 |  |  |           echo "REL_VER=$REL_VER" >> $GITHUB_ENV
 | 
					
						
							| 
									
										
										
										
											2023-03-18 17:50:14 +00:00
										 |  |  |           echo -e "# Release Notes\n" >> "body.md"
 | 
					
						
							|  |  |  |           echo "$DES" >> "body.md"
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       - name: Publish the flatpak in a new release
 | 
					
						
							|  |  |  |         uses: ncipollo/release-action@v1
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:50:47 +00:00
										 |  |  |         env:
 | 
					
						
							|  |  |  |           REL_VER: ${{ env.REL_VER }}
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  |         with:
 | 
					
						
							| 
									
										
										
										
											2023-03-17 17:03:43 +00:00
										 |  |  |           tag: ${{ env.REL_VER }}
 | 
					
						
							| 
									
										
										
										
											2023-03-17 17:05:50 +00:00
										 |  |  |           name: "RetroDECK v${{ env.REL_VER }}"
 | 
					
						
							| 
									
										
										
										
											2023-03-17 16:59:08 +00:00
										 |  |  |           bodyFile: "body.md"
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:31:01 +00:00
										 |  |  |           #artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz"
 | 
					
						
							|  |  |  |           allowUpdates: true
 | 
					
						
							|  |  |  |           draft: true
 | 
					
						
							|  |  |  |           token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
 | 
					
						
							|  |  |  |           repo: RetroDECK
 | 
					
						
							| 
									
										
										
										
											2023-03-17 14:50:47 +00:00
										 |  |  |         #continue-on-error: true
 |