archlinux-s390x/.github/workflows/release.yml
2025-06-01 19:22:10 +02:00

145 lines
4.9 KiB
YAML

name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: true
type: string
release_notes:
description: 'Release notes'
required: false
type: string
default: 'New release'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Podman
run: |
sudo apt-get update
sudo apt-get install -y podman
- name: Build containers
run: |
echo "Building required containers..."
# Build the main container
scripts/build-container.sh
- name: Build kernel
run: |
echo "Building s390x kernel..."
scripts/build-kernel-container.sh
- name: Build s390x busybox
run: |
echo "Building s390x busybox binary..."
# The build-all.sh script will handle this automatically
# but we'll call it explicitly for clarity in CI
if [ ! -f output/busybox-s390x-static ]; then
sudo podman run --rm \
-v $PWD:/work \
-v $PWD/output:/output \
-w /work \
s390x-archlinux-dev \
/work/scripts/build-busybox-s390x.sh
fi
- name: Build initramfs
run: |
echo "Building s390x initramfs..."
scripts/build-initramfs-final.sh
- name: Prepare boot files
run: |
echo "Preparing boot configuration..."
scripts/prepare-boot.sh
- name: Prepare release artifacts
run: |
mkdir -p release-artifacts
# Copy kernel
cp output/vmlinuz-6.6.10-s390x release-artifacts/vmlinuz-linux-s390x
# Copy initramfs
cp output/initramfs-6.6.10-s390x.img release-artifacts/initramfs-linux-s390x.img
# Copy boot configuration files
cp -r boot/* release-artifacts/
# Create checksums
cd release-artifacts
sha256sum * > SHA256SUMS
cd ..
# Create tarball of all artifacts
tar -czf archlinux-s390x-${{ github.event.inputs.version }}.tar.gz -C release-artifacts .
# Capture build information
echo "KERNEL_VERSION=6.6.10" >> $GITHUB_ENV
echo "MKINITCPIO_COMMIT=$(cd mkinitcpio-source && git rev-parse HEAD)" >> $GITHUB_ENV
echo "MKINITCPIO_SHORT_COMMIT=$(cd mkinitcpio-source && git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.version }}
name: Arch Linux s390x ${{ github.event.inputs.version }}
body: |
# Arch Linux s390x Port - ${{ github.event.inputs.version }}
${{ github.event.inputs.release_notes }}
## Build Information
- **Kernel Version**: ${{ env.KERNEL_VERSION }}
- **mkinitcpio**: Built from commit [`${{ env.MKINITCPIO_SHORT_COMMIT }}`](https://github.com/archlinux/mkinitcpio/commit/${{ env.MKINITCPIO_COMMIT }})
- **Build Date**: ${{ github.event.repository.updated_at }}
## Release Contents
This release includes:
- **vmlinuz-linux-s390x**: Linux kernel ${{ env.KERNEL_VERSION }} for s390x architecture
- **initramfs-linux-s390x.img**: Initial RAM filesystem with s390x busybox
- **Boot configuration files**: IPL configuration for s390x mainframes
- **SHA256SUMS**: Checksums for all artifacts
## Quick Start
```bash
# Download and extract
tar -xzf archlinux-s390x-${{ github.event.inputs.version }}.tar.gz
# Test with QEMU
qemu-system-s390x \
-machine s390-ccw-virtio \
-cpu max \
-m 2G \
-kernel vmlinuz-linux-s390x \
-initrd initramfs-linux-s390x.img \
-append "console=ttyS0 init=/init" \
-nographic
```
## Build Information
- **Kernel**: Linux 6.6.10
- **Architecture**: IBM s390x (big-endian)
- **Build System**: Container-based cross-compilation
- **Status**: Boots to emergency shell
draft: false
prerelease: false
files: |
archlinux-s390x-${{ github.event.inputs.version }}.tar.gz
release-artifacts/vmlinuz-linux-s390x
release-artifacts/initramfs-linux-s390x.img
release-artifacts/SHA256SUMS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}