-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (38 loc) · 1.18 KB
/
archlinux-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This workflow will build a pacman package from namban
name: package namban for pacman
on:
release:
types:
- created
env:
api_key: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.event.repository.name }}
release_name: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install Packages via Pacman
run: |
pacman -Sy
pacman --noconfirm -S base-devel pango glib2 librsvg unzip zip fakeroot python python-gobject gtk4
useradd -m builder
passwd -d builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' | tee /etc/sudoers.d/builder
chown -R builder:builder $GITHUB_WORKSPACE
- name: Make Package
run: |
cd package/archlinux
su builder -c "bash build.sh"
- name: Upload zst file to the release
run: |
echo $(ls)
cd $GITHUB_WORKSPACE/package/archlinux/build
gh release upload ${{ github.event.release.tag_name }} ./namban*zst -R ${{ github.repository }}