|
| 1 | +name: Release ISO |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*" |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + version: |
| 10 | + description: "Version override (e.g. 0.2.0). Defaults to tag name minus the v prefix." |
| 11 | + required: false |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: write |
| 15 | + |
| 16 | +jobs: |
| 17 | + build-and-release: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout Eclipse Linux |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Clone dynamod init system |
| 25 | + run: git clone --depth 1 https://github.com/sinisterMage/dynamod.git dynamod |
| 26 | + |
| 27 | + - name: Determine version |
| 28 | + id: meta |
| 29 | + run: | |
| 30 | + if [ -n "${{ inputs.version }}" ]; then |
| 31 | + VER="${{ inputs.version }}" |
| 32 | + elif [ "${{ github.ref_type }}" = "tag" ]; then |
| 33 | + VER="${GITHUB_REF_NAME#v}" |
| 34 | + else |
| 35 | + VER="0.0.0-dev" |
| 36 | + fi |
| 37 | + echo "version=$VER" >> "$GITHUB_OUTPUT" |
| 38 | + echo "iso_name=eclipse-linux-${VER}.iso" >> "$GITHUB_OUTPUT" |
| 39 | + echo "==> Building Eclipse Linux v${VER}" |
| 40 | +
|
| 41 | + - name: Install system dependencies |
| 42 | + run: | |
| 43 | + sudo apt-get update |
| 44 | + sudo apt-get install -y \ |
| 45 | + squashfs-tools \ |
| 46 | + xorriso \ |
| 47 | + grub-common \ |
| 48 | + grub-pc-bin \ |
| 49 | + grub-efi-amd64-bin \ |
| 50 | + mtools \ |
| 51 | + cpio \ |
| 52 | + gzip \ |
| 53 | + wget \ |
| 54 | + unzip \ |
| 55 | + musl-tools |
| 56 | +
|
| 57 | + - name: Setup Zig |
| 58 | + uses: mlugg/setup-zig@v2 |
| 59 | + with: |
| 60 | + version: "0.15.0" |
| 61 | + |
| 62 | + - name: Setup Rust |
| 63 | + uses: dtolnay/rust-toolchain@stable |
| 64 | + with: |
| 65 | + targets: x86_64-unknown-linux-musl |
| 66 | + |
| 67 | + - name: Cache Rust build artifacts |
| 68 | + uses: actions/cache@v4 |
| 69 | + with: |
| 70 | + path: | |
| 71 | + ~/.cargo/registry |
| 72 | + ~/.cargo/git |
| 73 | + dynamod/rust/target |
| 74 | + eclipse-installer/target |
| 75 | + key: rust-${{ runner.os }}-${{ hashFiles('dynamod/rust/**/Cargo.lock', 'eclipse-installer/Cargo.lock') }} |
| 76 | + restore-keys: rust-${{ runner.os }}- |
| 77 | + |
| 78 | + - name: Cache Void rootfs tarball |
| 79 | + uses: actions/cache@v4 |
| 80 | + with: |
| 81 | + path: build/.cache |
| 82 | + key: void-rootfs-${{ env.VOID_DATE }} |
| 83 | + env: |
| 84 | + VOID_DATE: "20250202" |
| 85 | + |
| 86 | + - name: Build dynamod |
| 87 | + run: make dynamod |
| 88 | + |
| 89 | + - name: Build eclipse-installer |
| 90 | + run: make installer |
| 91 | + |
| 92 | + - name: Build rootfs and ISO |
| 93 | + env: |
| 94 | + ECLIPSE_VERSION: ${{ steps.meta.outputs.version }} |
| 95 | + run: make iso |
| 96 | + |
| 97 | + - name: Generate checksums |
| 98 | + working-directory: build |
| 99 | + run: | |
| 100 | + sha256sum *.iso > SHA256SUMS |
| 101 | + cat SHA256SUMS |
| 102 | +
|
| 103 | + - name: Upload ISO as build artifact |
| 104 | + uses: actions/upload-artifact@v4 |
| 105 | + with: |
| 106 | + name: ${{ steps.meta.outputs.iso_name }} |
| 107 | + path: | |
| 108 | + build/eclipse-linux-*.iso |
| 109 | + build/SHA256SUMS |
| 110 | + compression-level: 0 |
| 111 | + |
| 112 | + - name: Create GitHub Release |
| 113 | + if: github.ref_type == 'tag' |
| 114 | + uses: softprops/action-gh-release@v2 |
| 115 | + with: |
| 116 | + name: Eclipse Linux v${{ steps.meta.outputs.version }} |
| 117 | + draft: false |
| 118 | + generate_release_notes: true |
| 119 | + body: | |
| 120 | + ## Eclipse Linux v${{ steps.meta.outputs.version }} |
| 121 | +
|
| 122 | + Hybrid ISO (BIOS + UEFI) built on Void Linux musl with the [dynamod](https://github.com/sinisterMage/dynamod) init system. |
| 123 | +
|
| 124 | + ### Verify download |
| 125 | + ```sh |
| 126 | + sha256sum -c SHA256SUMS |
| 127 | + ``` |
| 128 | +
|
| 129 | + ### Write to USB |
| 130 | + ```sh |
| 131 | + sudo dd if=${{ steps.meta.outputs.iso_name }} of=/dev/sdX bs=4M status=progress oflag=sync |
| 132 | + ``` |
| 133 | +
|
| 134 | + ### Boot in QEMU |
| 135 | + ```sh |
| 136 | + qemu-system-x86_64 -cdrom ${{ steps.meta.outputs.iso_name }} -boot d -m 2048M -smp 2 -enable-kvm -cpu host |
| 137 | + ``` |
| 138 | + files: | |
| 139 | + build/eclipse-linux-*.iso |
| 140 | + build/SHA256SUMS |
0 commit comments