Skip to content

Release Linux

Release Linux #27

Workflow file for this run

name: Release Linux
on:
workflow_dispatch:
release:
types: [ created, edited ]
jobs:
#
# Build
#
build:
strategy:
matrix:
dist: [arch,alpine,jammy]
runs-on: ubuntu-latest
steps:
# Install required tools
- name: Install tools
run: |
sudo env DEBIAN_FRONTEND=noninteractive apt install -y tar xz-utils debootstrap coreutils
# Download source from repository
- uses: actions/checkout@v4
# Fetch tools
- name: Fetch tools
run: |
./deploy/flatimage.sh fetch
# Build
- name: Build
run: |
./deploy/flatimage.sh build ${{ matrix.dist }}
# Build the flatimage
- name: Build ArchLinux
if: matrix.dist == 'arch'
run: |
cp elf-${{ matrix.dist }} bin/elf
sudo ./src/scripts/_build.sh archbootstrap
- name: Build Alpine
if: matrix.dist == 'alpine'
run: |
cp elf-${{ matrix.dist }} bin/elf
sudo ./src/scripts/_build.sh alpinebootstrap
- name: Build Jammy
if: matrix.dist == 'jammy'
run: |
cp elf-${{ matrix.dist }} bin/elf
sudo ./src/scripts/_build.sh debootstrap jammy
# Upload
- name: Upload flatimage
uses: actions/upload-artifact@v3
with:
name: flatimage
path: dist
#
# Release
#
release:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
name: flatimage
path: dist
- name: Upload to release
uses: fnkr/github-action-ghr@v1
env:
GHR_PATH: dist/
GHR_REPLACE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}