Add test Arch build
This commit is contained in:
parent
96d6e78d7e
commit
6aecec2e75
57
.github/workflows/release.yml
vendored
Normal file
57
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- feature/pkg
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]*'
|
||||||
|
|
||||||
|
name: Create release and upload binaries
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-arch:
|
||||||
|
name: Build Arch Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
pkg/arch/build.sh
|
||||||
|
mkdir release
|
||||||
|
mv pkg/arch/**/*.pkg.tar.zst* release
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: arch-latest
|
||||||
|
path: release
|
||||||
|
release:
|
||||||
|
name: Create and Upload Release
|
||||||
|
needs: [build-arch]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download Arch Linux artifacts
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: arch-latest
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload Arch Linux Assets to Release
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ./arch-latest/*
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
24
pkg/arch/build.sh
Executable file
24
pkg/arch/build.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Package compression settings (Matches latest Arch)
|
||||||
|
export PKGEXT='.pkg.tar.zst'
|
||||||
|
export COMPRESSZST=(zstd -c -T0 --ultra -20 -)
|
||||||
|
|
||||||
|
# Create user
|
||||||
|
useradd -m -g wheel -s /bin/sh tester
|
||||||
|
echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
chown -R nobody:wheel .
|
||||||
|
|
||||||
|
# Install makepkg deps
|
||||||
|
pacman -Sy sudo binutils fakeroot grep base-devel git --noconfirm
|
||||||
|
|
||||||
|
# Build the packages as `nobody' user
|
||||||
|
# TODO: use --sign --key <key>
|
||||||
|
pushd pkg/arch/surface
|
||||||
|
su nobody -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm'
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd pkg/arch/kernel
|
||||||
|
# su nobody -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm'
|
||||||
|
popd
|
Loading…
Reference in a new issue