rustmon/.github/workflows/build.yml
2024-03-25 13:06:43 +08:00

53 lines
1.1 KiB
YAML

name: Build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build-arch:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
pacman -Syu --noconfirm base-devel rust
useradd builder -m -G wheel
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
- name: Build Arch package
run: |
chown -R builder:builder .
cd build/arch
sudo -u builder bash -c "makepkg -sf --noconfirm"
- name: Upload Arch package
uses: actions/upload-artifact@v2
with:
name: pokerust.pkg.tar.zst
path: ./*.pkg.tar.zst
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
run: ./build/debian/debian.sh
- name: Upload Debian package
uses: actions/upload-artifact@v2
with:
name: pokerust.deb
path: ./build/debian/pokerust.deb