-
Notifications
You must be signed in to change notification settings - Fork 701
45 lines (36 loc) · 1.13 KB
/
debian-changelog.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
# SPDX-FileCopyrightText: 2023 Andrea Pappacoda
# SPDX-License-Identifier: Apache-2.0
name: debian-changelog
on:
push:
branches: [ master ]
paths: version.txt
defaults:
run:
shell: sh
jobs:
debian-changelog:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install --no-install-recommends devscripts git
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update debian/changelog
run: |
git switch debian
git checkout master -- version.txt
export DEBFULLNAME=$(grep '^Maintainer:' control | cut -d : -f 2 | cut -d '<' -f 1 | xargs echo)
export DEBEMAIL=$(grep '^Maintainer:' control | cut -d '<' -f 2 | tr -d '>')
xargs -I version dch -v version-1 -c changelog '' < version.txt
env:
TZ: UTC0
- name: Push updated changelog
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
xargs -I version git commit -m 'changelog: update to version' changelog < version.txt
git push