-
Notifications
You must be signed in to change notification settings - Fork 33
75 lines (66 loc) · 1.98 KB
/
Copy pathbuild-deb.yml
File metadata and controls
75 lines (66 loc) · 1.98 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: Build Debian package
on:
push:
branches:
- "**"
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build-deb:
runs-on: ubuntu-24.04
name: Build Debian package
steps:
- uses: actions/checkout@v4
- name: Update apt cache
run: |
sudo apt-get update
- name: Install Poetry
run: pipx install poetry~=2.1.3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "poetry"
- name: Setup project with Poetry
run: |
python --version; python -m pip --version; poetry --version
poetry install --no-interaction
- name: Prepare to build a Debian package
run: |
sudo apt-get -y install build-essential debhelper dh-make rename
- name: Build a Debian package
run: |
poetry run poe build_deb
- name: Archive the built Debian package
uses: actions/upload-artifact@v4
with:
name: smartmeter-datacollector-deb
path: deb_dist/*.deb
- name: Archive the additional Debian package files
uses: actions/upload-artifact@v4
with:
name: smartmeter-datacollector-packagefiles
path: |
deb_dist/*.buildinfo
deb_dist/*.changes
deb_dist/*.tar.*
- name: Get the tag name
id: tagName
if: startsWith(github.ref, 'refs/tags')
uses: olegtarasov/get-tag@v2.1.4
- name: Create a new release
if: startsWith(github.ref, 'refs/tags')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: deb_dist/*.deb
draft: true
name: Smart Meter Data Collector ${{ steps.tagName.outputs.tag }}
omitBody: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}