Skip to content

publish.yml: add a rule to get and publish kernel artifact #1

publish.yml: add a rule to get and publish kernel artifact

publish.yml: add a rule to get and publish kernel artifact #1

Workflow file for this run

name: u-root-publish
on:
push:
tags:
- '*'
jobs:
publish:
strategy:
matrix:
template: ["core", "boot core", "world", "cpu"]
arch: [amd64, arm, arm64, riscv64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: |
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
go install github.com/hugelgupf/vmtest/tools/runvmtest@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
-o ${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
xz --check=crc32 -9 --lzma2=dict=1MiB \
--stdout ${{ matrix.arch }}-${{ matrix.template }}.cpio | \
dd conv=sync bs=512 \
of=${{ matrix.arch }}-${{ matrix.template }}.cpio.xz
runvmtest -- bash -c "cp \$VMTEST_KERNEL ./kernel-x86_64"
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ matrix.arch }}-${{ matrix.template }}.cpio.xz
asset_name: u-root_${{ matrix.arch }}_${{ matrix.template }}.cpio.xz
- name: Upload_kernels
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: kernel-x86_64
asset_name: kernel-x86_64