-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (66 loc) · 2.28 KB
/
downstream.yaml
File metadata and controls
76 lines (66 loc) · 2.28 KB
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
name: downstream packaging
on:
push:
tags:
- 'v*'
jobs:
aur-publish:
name: update aur package
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Validate & update checksums
uses: hapakaien/archlinux-package-action@v2.2.0
with:
path: packaging/arch
updpkgsums: true
# workaround for https://github.com/hapakaien/archlinux-package-action/issues/23
aur: true
- name: publish
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
with:
pkgname: sodalite
pkgbuild: packaging/arch/PKGBUILD
commit_username: "Heiko Nickerl"
commit_email: "dev@hnicke.de"
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
debian-package:
name: build debian package
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: prepare package
run: ./packaging/deb/assemble
- name: build debian package
uses: dawidd6/action-debian-package@v1
with:
source_directory: packaging/deb/pkg
artifacts_directory: packaging/deb/build
- name: upload debian package to release
uses: Roang-zero1/github-upload-release-artifacts-action@master
with:
args: packaging/deb/build/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: dispatch event to ppa repository
run: |
version=$(echo $GITHUB_REF | cut -d/ -f3 | cut -dv -f2)
status=$(curl \
-X POST \
https://api.github.com/repos/hnicke/debian-repository/dispatches \
-d '{
"event_type":"add_package",
"client_payload": {
"download_url": "https://github.com/hnicke/sodalite/releases/download/v'"$version"'/sodalite_'"$version"'_all.deb"
}
}' \
-u "${{ secrets.DEBIAN_REPOSITORY_USER }}:${{ secrets.DEBIAN_REPOSITORY_TOKEN }}" \
-L \
-H "Accept: application/vnd.github.v3+json" \
-so /dev/null \
-w "%{http_code}")
echo "Dispatch response: $status"
[ "$status" = 204 ]