From 2fce15e7f693b37bc74c990bf664d6c3a2193952 Mon Sep 17 00:00:00 2001 From: Vomitblood Date: Mon, 25 Mar 2024 12:52:40 +0800 Subject: [PATCH] add CI --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ build/arch/PKGBUILD | 2 +- build/debian/debian.sh | 2 ++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..37ef417 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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 + + - name: Build Arch package + run: 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.sh + + - name: Upload Debian package + uses: actions/upload-artifact@v2 + with: + name: pokerust.deb + path: ./build/debian/pokerust.deb diff --git a/build/arch/PKGBUILD b/build/arch/PKGBUILD index dad5e89..1202c3a 100644 --- a/build/arch/PKGBUILD +++ b/build/arch/PKGBUILD @@ -1,7 +1,7 @@ pkgname=pokerust-git pkgdesc="Pokemon Colorscripts written in Rust" _gitname=pokerust -pkgver=r5.7fe497e +pkgver=r8.c1e2b64 pkgrel=1 arch=('x86_64') url="https://github.com/Vomitblood/$_gitname" diff --git a/build/debian/debian.sh b/build/debian/debian.sh index 1a460cb..7d1c8be 100644 --- a/build/debian/debian.sh +++ b/build/debian/debian.sh @@ -1,5 +1,7 @@ #!/bin/sh +# TODO: check for rust dependency + # create a directory structure that mirrors tha final structure of the installed package mkdir -p pokerust/DEBIAN mkdir -p pokerust/usr/bin