name: build image on: push: branches: - dev - main workflow_dispatch: pull_request_review: types: [submitted] jobs: build: runs-on: ubuntu-latest name: Build if: github.event_name != 'pull_request_review' || github.event.review.state == 'approved' steps: - name: Checkout uses: actions/checkout@v5 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "22" cache: "npm" cache-dependency-path: "**/package-lock.json" - name: Set up Golang uses: actions/setup-go@v5.5.0 with: go-version: "1.24.4" - name: Build frontend run: | make frontend - name: Build application run: | make build_dev - name: Run tests run: | go test ./... -json > testreport.json - name: Make test cases run: | make build_dev_test - name: Golang Test Report uses: becheran/go-testreport@v0.3.2 with: input: "testreport.json" - name: Upload artifact uses: actions/upload-artifact@v4 with: name: jetkvm-app path: | bin/jetkvm_app device-tests.tar.gz release: runs-on: ubuntu-latest name: Release needs: build if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout uses: actions/checkout@v4 - name: Download artifacts uses: actions/download-artifact@v4 - name: Draft release uses: softprops/action-gh-release@v2 with: # need review before making a real release draft: true files: bin/jetkvm_app fail_on_unmatched_files: true tag_name: ${{ github.ref }} name: ${{ github.ref }} generate_release_notes: true