Skip to content

Commit ed7d78b

Browse files
committed
created arch build action file
1 parent 58c4bfe commit ed7d78b

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# .github/workflows/build-archlinux.yml
2+
name: Arch Linux Build & Test
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
name: Build on Arch Linux
14+
runs-on: ubuntu-latest
15+
container: archlinux:latest
16+
17+
steps:
18+
# Check out the repository code
19+
- name: Check out repository
20+
uses: actions/checkout@v4
21+
22+
# Prepare the Arch Linux container for building
23+
- name: Set up build environment
24+
run: |
25+
pacman -Syu --noconfirm
26+
pacman -S --noconfirm base-devel git
27+
28+
# Build the package using makepkg
29+
- name: Build the package
30+
run: |
31+
# Create a non-root user to run the build for security
32+
useradd -m builder
33+
chown -R builder:builder .
34+
35+
# Switch to the builder user and run makepkg
36+
# The -s flag installs dependencies from the PKGBUILD
37+
su builder -c "cd PACKAGEBUILD && makepkg -s --noconfirm"
38+
39+
# Upload the compiled package as a workflow artifact
40+
- name: Upload build artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: arch-package
44+
path: PACKAGEBUILD/*.pkg.tar.*

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ compile_commands.json
4242
*node_modules*
4343

4444
# others
45-
*.txt
45+
*.txt
46+
47+
# pkgbuild files
48+
PKGBUILD/*
49+
!PKGBUILD/PKGBUILD

PKGBUILD/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pkgname=nepdate-git
33
_pkgname=nepdate
44
pkgdesc='Standalone Nepali calendar widget and converter for Bikram Sambat and Gregorian calendars. (Git version)'
5-
pkgver=0.5.r29.g6c8e3b3
5+
pkgver=.r170.g3f530cc
66
pkgrel=1
77
arch=('x86_64' 'aarch64')
88
url="https://github.com/khumnath/nepdate"

0 commit comments

Comments
 (0)