mirror of
https://github.com/strongtz/i915-sriov-dkms.git
synced 2026-05-06 13:42:34 +08:00
74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
|
|
jobs:
|
|
packaging-debian:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential devscripts dh-make dh-dkms dkms
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
path: i915-sriov-dkms
|
|
- name: Packaging
|
|
working-directory: i915-sriov-dkms
|
|
run: |
|
|
LATEST_VERSION=$(grep "^PACKAGE_VERSION" "dkms.conf" | sed 's/.*\?"\([^"]*\)".*/\1/')
|
|
sed -i "s/###LATEST_VERSION###/$LATEST_VERSION/g" debian/control debian/changelog
|
|
dpkg-buildpackage -b -tc -us -uc
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: debain-package
|
|
path: "*.deb"
|
|
|
|
packaging-archlinux:
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: archlinux:base-devel
|
|
steps:
|
|
- name: Install Dependencies
|
|
run: |
|
|
pacman-key --init
|
|
pacman -Syu --noconfirm git dkms
|
|
useradd -m user
|
|
sed -i 's/COMPRESSZST=.*/COMPRESSZST=(zstd -c -T0 --ultra -22 -)/' /etc/makepkg.conf
|
|
echo "user ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
path: i915-sriov-dkms
|
|
- name: Packaging
|
|
working-directory: i915-sriov-dkms
|
|
run: |
|
|
chown -R user: .
|
|
sudo -u user makepkg -s --noconfirm
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: arch-package
|
|
path: "i915-sriov-dkms/*.pkg*"
|
|
release:
|
|
runs-on: ubuntu-24.04
|
|
needs: [packaging-debian, packaging-archlinux]
|
|
if: github.ref_type == 'tag'
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
merge-multiple: true
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
*.pkg*
|
|
*.deb
|