-
-
Notifications
You must be signed in to change notification settings - Fork 6
82 lines (69 loc) · 2.16 KB
/
autoupdate.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Autoupdate
# The main ActivityWatch repo sends a dispatch here on published stable releases
on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
autoupdate:
name: "Update AUR package"
runs-on: ubuntu-latest
container: archlinux:base-devel
defaults:
run:
shell: bash
steps:
- name: Install dependencies with pacman
run: |
pacman -Syu --noconfirm
pacman -S git namcap --noconfirm
# Check out this repo
- uses: actions/checkout@v3
with:
path: 'activitywatch-bin'
# Check out activitywatch repo
- uses: actions/checkout@v3
with:
repository: ActivityWatch/activitywatch
path: 'activitywatch-src'
fetch-depth: 0
- name: Get latest version
run: |
pushd activitywatch-src
VERSION=$(STABLE_ONLY=true ./scripts/get_latest_release.sh | cut -c2-)
echo "Latest version is $VERSION"
popd
pushd activitywatch-bin
sed -E -i "s/^pkgver=.+\$/pkgver='$VERSION'/g" PKGBUILD
- name: Run namcap
run: |
pushd activitywatch-bin
make check
popd
- name: Set up user
run: |
useradd builduser -m # Create the builduser
passwd -d builduser # Delete the buildusers password
chmod -R a+rw activitywatch-bin
- name: Make SRCINFO and package
run: |
pushd activitywatch-bin
# needs to be run as a non-root user due to makepkg root-checks: https://www.reddit.com/r/archlinux/comments/6qu4jt/how_to_run_makepkg_in_docker_container_yes_as_root/
sudo -u builduser bash -c 'make package'
popd
- name: Check SRCINFO
uses: 2m/arch-pkgbuild-builder@v1.16
with:
target: 'srcinfo'
pkgname: 'activitywatch-bin'
#- name: Build PKGBUILD
# uses: 2m/arch-pkgbuild-builder@v1.16
# with:
# target: 'pkgbuild'
# pkgname: 'activitywatch-bin'
- name: Check that basic commands run
uses: 2m/arch-pkgbuild-builder@v1.16
with:
target: 'run'
pkgname: 'activitywatch-bin'
command: 'aw-qt --help && aw-server-rust --version' # && aw-server --version