Skip to content

Commit 3d4229f

Browse files
MDjuraumuell
authored andcommitted
add action workflow to build arch package on release
1 parent 86b45d0 commit 3d4229f

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/release_arch.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Arch Release
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [created]
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: Arch Package Build
14+
runs-on: ubuntu-latest
15+
container:
16+
image: archlinux
17+
steps:
18+
- name: Install build environment
19+
run: >
20+
pacman -Sy --noconfirm && pacman -S --noconfirm base-devel git cmake ninja sudo
21+
22+
- name: Init environment
23+
run: >
24+
useradd --create-home builder && usermod -aG wheel builder && echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
25+
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
with:
29+
ref: ${{ github.ref }}
30+
31+
- name: Change permission for covise
32+
run: |
33+
chmod -R 777 $GITHUB_WORKSPACE
34+
35+
- name: Build Package
36+
run: |
37+
sudo -u builder bash -c "cd '$GITHUB_WORKSPACE/archive/arch' && makepkg --noconfirm -s"
38+
39+
- name: Release Package
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: 'archive/arch/*.pkg.tar.zst'
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)