mirror of
				https://gitlab.com/qemu-project/openbios.git
				synced 2024-02-13 08:34:06 +08:00 
			
		
		
		
	.github/workflows: add release.yml for generating an OpenBIOS release
This is a GitHub push action that builds OpenBIOS for all of the currently supported architectures (amd64, sparc32, sparc64, ppc and x86) and a new GitHub release consisting of an output zip file containing debug and release binaries, along with the source in .tar.gz and .zip formats. A release build is triggered by pushing a tag beginning with "v" indicating a version number in contrast to pushing a branch. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
		
							
								
								
									
										101
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										101
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,101 @@ | ||||
| name: Release OpenBIOS | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     # Build for release tags only | ||||
|     branches: | ||||
|       - "!*" | ||||
|     tags: | ||||
|       - "v*" | ||||
|  | ||||
| jobs: | ||||
|   release: | ||||
|     runs-on: ubuntu-latest | ||||
|     name: OpenBIOS release for amd64 ppc sparc32 sparc64 x86 | ||||
|     container: | ||||
|       image: ghcr.io/openbios/openbios-builder:master | ||||
|     steps: | ||||
|       - name: Checkout OpenBIOS | ||||
|         uses: actions/checkout@v2 | ||||
|  | ||||
|       - name: Backup Makefile.target | ||||
|         run: cp Makefile.target Makefile.target.orig | ||||
|  | ||||
|       - name: Configure debug | ||||
|         run: | | ||||
|           cat Makefile.target.orig | sed 's#CFLAGS+= -Os#CFLAGS+= -O0#g' > Makefile.target | ||||
|           ./config/scripts/switch-arch amd64 ppc sparc32 sparc64 x86 | ||||
|  | ||||
|       - name: Build debug | ||||
|         run: "make V=1" | ||||
|  | ||||
|       - name: Move debug build | ||||
|         run: "mkdir -p debug && mv obj-* debug" | ||||
|  | ||||
|       - name: Configure release | ||||
|         run: | | ||||
|           cp Makefile.target.orig Makefile.target | ||||
|           ./config/scripts/switch-arch amd64 ppc sparc32 sparc64 x86 | ||||
|  | ||||
|       - name: Build release | ||||
|         run: "make V=1" | ||||
|  | ||||
|       - name: Move release build | ||||
|         run: "mkdir -p release && mv obj-* release" | ||||
|  | ||||
|       - name: Store artifacts | ||||
|         uses: actions/upload-artifact@v2 | ||||
|         with: | ||||
|           name: "openbios-multiarch-${{ github.ref_name }}" | ||||
|           path: | | ||||
|             debug/obj-x86/*.dict | ||||
|             debug/obj-x86/openbios-builtin* | ||||
|             debug/obj-x86/openbios.multiboot* | ||||
|             debug/obj-x86/openbios-multiboot.syms | ||||
|             debug/obj-x86/QEMU,VGA.bin | ||||
|             debug/obj-amd64/openbios-unix | ||||
|             debug/obj-amd64/*.dict | ||||
|             debug/obj-ppc/*.dict | ||||
|             debug/obj-ppc/openbios-qemu* | ||||
|             debug/obj-ppc/QEMU,VGA.bin | ||||
|             debug/obj-sparc32/*.dict | ||||
|             debug/obj-sparc32/openbios-builtin* | ||||
|             debug/obj-sparc32/QEMU,cgthree.bin | ||||
|             debug/obj-sparc32/QEMU,tcx.bin | ||||
|             debug/obj-sparc64/*.dict | ||||
|             debug/obj-sparc64/openbios-builtin* | ||||
|             debug/obj-sparc64/QEMU,VGA.bin | ||||
|             release/obj-x86/*.dict | ||||
|             release/obj-x86/openbios-builtin* | ||||
|             release/obj-x86/openbios.multiboot* | ||||
|             release/obj-x86/openbios-multiboot.syms | ||||
|             release/obj-x86/QEMU,VGA.bin | ||||
|             release/obj-amd64/openbios-unix | ||||
|             release/obj-amd64/*.dict | ||||
|             release/obj-ppc/*.dict | ||||
|             release/obj-ppc/openbios-qemu* | ||||
|             release/obj-ppc/QEMU,VGA.bin | ||||
|             release/obj-sparc32/*.dict | ||||
|             release/obj-sparc32/openbios-builtin* | ||||
|             release/obj-sparc32/QEMU,cgthree.bin | ||||
|             release/obj-sparc32/QEMU,tcx.bin | ||||
|             release/obj-sparc64/*.dict | ||||
|             release/obj-sparc64/openbios-builtin* | ||||
|             release/obj-sparc64/QEMU,VGA.bin | ||||
|  | ||||
|       - name: Prepare release from artifacts | ||||
|         uses: actions/download-artifact@v2 | ||||
|         with: | ||||
|           name: "openbios-multiarch-${{ github.ref_name }}" | ||||
|           path: archive | ||||
|  | ||||
|       - name: Archive release | ||||
|         run: cd archive && zip -r ../openbios-multiarch-${{ github.ref_name }}.zip debug release && cd .. | ||||
|  | ||||
|       - name: Upload release | ||||
|         uses: "marvinpinto/action-automatic-releases@latest" | ||||
|         with: | ||||
|           repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||||
|           prerelease: false | ||||
|           automatic_release_tag: "${{ github.ref_name }}" | ||||
|           files: "openbios-multiarch-${{ github.ref_name }}.zip" | ||||
		Reference in New Issue
	
	Block a user
	 Mark Cave-Ayland
					Mark Cave-Ayland