Add Debian package support and publish workflow

This commit is contained in:
Stillkill committed 2026-06-08 21:13:04 -05:00
1 parent bd1478bca1
commit 79cb442d35
8 files changed
+319 -3

No files matched your search

+66
View File
@@ -0,0 +1,66 @@
name: Build Arch Package
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Install Node for Actions
run: |
pacman -Syu --noconfirm nodejs
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Arch build environment
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel dotnet-sdk git
dotnet publish -c Release -r linux-x64 --self-contained \
-p:PublishSingleFile=true \
-p:UseAppHost=true \
-p:DebugType=embedded \
-o "/usr/local/bin" GiteaPublish
- name: Get application version
id: get_version
run: |
VERSION=$(dotnet run -v q --property WarningLevel=0 --project GiteaPublish -- --version)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Application version: $VERSION"
- name: Prepare PKGBUILD
run: |
cd GiteaPublish
sed -i "s/<PKG-VER>/${{ steps.get_version.outputs.version }}/g" PKGBUILD
cat PKGBUILD
- name: Build Arch package
run: |
cd GiteaPublish
pwd
useradd -m builder
chown -R builder:builder .
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
su builder -c "makepkg -s --noconfirm"
- name: List built packages
run: |
cd GiteaPublish
pwd
ls -lah *.pkg.tar.zst
echo "package_file=$(ls *.pkg.tar.zst | head -n 1)" >> $GITHUB_OUTPUT
id: package_info
- name: Upload Arch package artifact
run: |
#I used the package to upload the package
chmod +x GiteaPublish/src/output/GiteaPublish
GiteaPublish/src/output/GiteaPublish package arch publish --username ${{ secrets.USERNAME }} --password ${{ secrets.PASSWORD }} -b https://git.stillkill.net -o Stillkill -r sk-arch -f "GiteaPublish/${{ steps.package_info.outputs.package_file }}"