Co-authored-by: tahahawa <tahahawa@gmail.com> Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/58 Reviewed-by: johnride <jg@nationtech.io> Co-authored-by: Taha Hawa <taha@taha.dev> Co-committed-by: Taha Hawa <taha@taha.dev>
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Compile and package harmony_composer
 | |
| on:
 | |
|   push:
 | |
|     branches:
 | |
|       - master
 | |
| 
 | |
| jobs:
 | |
|   package_harmony_composer:
 | |
|     container:
 | |
|       image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:eb0406fcb95c63df9b7c4b19bc50ad7914dd8232ce98e9c9abef628e07c69386
 | |
|     runs-on: dind
 | |
|     steps:
 | |
|       - name: Checkout code
 | |
|         uses: actions/checkout@v4
 | |
| 
 | |
|       - name: Build for Linux x86_64
 | |
|         run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu
 | |
| 
 | |
|       - name: Build for Windows x86_64 GNU
 | |
|         run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu
 | |
| 
 | |
|       - uses: actions/upload-artifact@v3
 | |
|         with:
 | |
|           name: binaries
 | |
|           path: |
 | |
|             target/x86_64-unknown-linux-gnu/release/harmony_composer
 | |
|             target/x86_64-pc-windows-gnu/release/harmony_composer.exe            
 | |
| 
 | |
|       - name: Setup log into hub.nationtech.io
 | |
|         uses: docker/login-action@v3
 | |
|         with:
 | |
|           registry: hub.nationtech.io
 | |
|           username: ${{ secrets.HUB_BOT_USER }}
 | |
|           password: ${{ secrets.HUB_BOT_PASSWORD }}
 | |
| 
 | |
|       # TODO: build ARM images and MacOS binaries (or other targets) too
 | |
| 
 | |
|       - name: Set up Docker Buildx
 | |
|         uses: docker/setup-buildx-action@v3
 | |
| 
 | |
|       - name: Build and push
 | |
|         uses: docker/build-push-action@v6
 | |
|         with:
 | |
|           context: .
 | |
|           push: true
 | |
|           tags: hub.nationtech.io/harmony/harmony_composer:latest
 |