-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.85 KB
/
deb-build.yaml
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
name: Packaging for Debian and Ubuntu
on:
workflow_dispatch:
release:
types:
- published
env:
DEBIAN_FRONTEND: noninteractive
DEBEMAIL: "[email protected]"
DEBFULLNAME: "Brendon Jones"
jobs:
debian-package:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target.distro }}:${{ matrix.target.codename }}
strategy:
fail-fast: false
matrix:
target:
- { distro: debian, codename: buster }
- { distro: debian, codename: bullseye }
- { distro: debian, codename: bookworm }
- { distro: ubuntu, codename: focal }
- { distro: ubuntu, codename: jammy }
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install prereq packages
run: |
apt-get update
apt-get -y upgrade
apt-get install -y ca-certificates devscripts dpkg-dev equivs
- name: Build packages
run: |
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
dpkg-buildpackage -b -us -uc -rfakeroot
- name: Store packages for publishing
run: |
export DIRNAME=${{ matrix.target.distro }}_${{ matrix.target.codename }}
mkdir -p packages/${DIRNAME}
cp ../*.deb packages/${DIRNAME}/
- name: Store artifacts for checking
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target.distro }} ${{ matrix.target.codename }} packages
path: packages/
retention-days: 7
- name: Publish packages to cloudsmith
if: ${{ github.event_name == 'release' }}
uses: wanduow/action-cloudsmith-upload-packages@v1
with:
path: packages/
repo: ${{ secrets.CLOUDSMITH_OWNER }}/amp
username: ${{ secrets.CLOUDSMITH_USERNAME }}
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}