2024-03-25 12:52:40 +08:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-03-25 12:58:45 +08:00
|
|
|
branches:
|
|
|
|
- '*'
|
2024-03-25 12:52:40 +08:00
|
|
|
pull_request:
|
2024-03-25 12:58:45 +08:00
|
|
|
branches:
|
|
|
|
- '*'
|
2024-03-25 12:52:40 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-arch:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: archlinux:latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2024-03-25 13:03:52 +08:00
|
|
|
run: |
|
|
|
|
pacman -Syu --noconfirm base-devel rust
|
|
|
|
useradd builder -m -G wheel
|
|
|
|
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
2024-03-25 12:52:40 +08:00
|
|
|
|
|
|
|
- name: Build Arch package
|
2024-03-25 13:03:52 +08:00
|
|
|
run: |
|
|
|
|
chown -R builder:builder .
|
2024-03-25 13:06:43 +08:00
|
|
|
cd build/arch
|
2024-03-25 13:03:52 +08:00
|
|
|
sudo -u builder bash -c "makepkg -sf --noconfirm"
|
2024-03-25 12:52:40 +08:00
|
|
|
|
2024-03-25 13:10:51 +08:00
|
|
|
- name: Print current directory
|
|
|
|
run: ls -la
|
|
|
|
|
2024-03-25 12:52:40 +08:00
|
|
|
- name: Upload Arch package
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: pokerust.pkg.tar.zst
|
2024-03-25 13:08:20 +08:00
|
|
|
path: ./**/*.pkg.tar.zst
|
2024-03-25 12:52:40 +08:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get install -y dpkg-dev
|
|
|
|
|
|
|
|
- name: Build Debian package
|
2024-03-25 13:12:32 +08:00
|
|
|
run: |
|
|
|
|
cd build/debian
|
|
|
|
sh debian.sh
|
2024-03-25 12:52:40 +08:00
|
|
|
|
|
|
|
- name: Upload Debian package
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: pokerust.deb
|
2024-03-25 13:12:32 +08:00
|
|
|
path: pokerust.deb
|