-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (133 loc) · 4.36 KB
/
Copy pathrelease-debian.yml
File metadata and controls
137 lines (133 loc) · 4.36 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build debian packages
on:
release:
types:
- published
env:
DEBIAN_FRONTEND: noninteractive
jobs:
debian-package-amd64:
name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}"
runs-on: ubuntu-latest
environment:
name: "release"
strategy:
matrix:
include:
- distro: "debian"
release: "bookworm"
arch: "amd64"
- distro: "debian"
release: "trixie"
arch: "amd64"
- distro: "ubuntu"
release: "jammy"
arch: "amd64"
- distro: "ubuntu"
release: "noble"
arch: "amd64"
container:
image: ${{ matrix.distro }}:${{ matrix.release }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install dependencies
run: |
apt-get update
apt-get -y upgrade
apt-get -y install devscripts dpkg-dev debhelper equivs
- name: Bump version
run: |
export DEBEMAIL='maintainers@faucet.nz'
export DEBFULLNAME='Faucet Maintainers'
debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release"
- name: Build package
run: |
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
dpkg-buildpackage -b -us -uc -rfakeroot
- name: Store package
run: |
artifact_dir=${{ matrix.distro }}_${{ matrix.release }}
mkdir -p packages/${artifact_dir}
cp ../*.deb packages/${artifact_dir}
- name: Publish package on packagecloud
uses: faucetsdn/action-packagecloud-upload-debian-packages@v1
with:
path: packages/
repo: faucetsdn/faucet-test
token: ${{ secrets.PACKAGECLOUD_TOKEN }}
debian-package-other:
name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}"
runs-on: ubuntu-latest
environment:
name: "release"
strategy:
matrix:
include:
- distro: "debian"
release: "bookworm"
image: "bookworm"
arch: "armv7"
- distro: "debian"
release: "bookworm"
image: "bookworm"
arch: "aarch64"
- distro: "debian"
release: "trixie"
image: "none"
arch: "none"
base_image: --platform=linux/arm/v7 arm32v7/debian:trixie
- distro: "debian"
release: "trixie"
image: "none"
arch: "none"
base_image: --platform=linux/arm64 arm64v8/debian:trixie
- distro: "ubuntu"
release: "jammy"
image: "ubuntu22.04"
arch: "armv7"
- distro: "ubuntu"
release: "jammy"
image: "ubuntu22.04"
arch: "aarch64"
- distro: "ubuntu"
release: "noble"
image: "ubuntu24.04"
arch: "armv7"
- distro: "ubuntu"
release: "noble"
image: "ubuntu24.04"
arch: "aarch64"
steps:
- name: Checkout repo
uses: actions/checkout@v6
- uses: uraimo/run-on-arch-action@v3
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.image }}
base_image: ${{ matrix.base_image }}
shell: /bin/bash
install: |
apt-get update
apt-get -y upgrade
apt-get -y install devscripts dpkg-dev debhelper equivs
run: |
export DEBEMAIL='maintainers@faucet.nz'
export DEBFULLNAME='Faucet Maintainers'
mkdir -p /build
cp -r ${GITHUB_WORKSPACE} /build/package
cd /build/package
debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release"
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
dpkg-buildpackage -b -us -uc -rfakeroot
artifact_dir=${{ matrix.distro }}_${{ matrix.release }}
mkdir -p "${GITHUB_WORKSPACE}/packages/${artifact_dir}"
cp ../*.deb "${GITHUB_WORKSPACE}/packages/${artifact_dir}"
- name: Publish package on packagecloud
uses: faucetsdn/action-packagecloud-upload-debian-packages@v1
with:
path: packages/
repo: faucetsdn/faucet-test
token: ${{ secrets.PACKAGECLOUD_TOKEN }}