-
-
Notifications
You must be signed in to change notification settings - Fork 7
101 lines (90 loc) · 3.08 KB
/
release.yml
File metadata and controls
101 lines (90 loc) · 3.08 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
target:
- ubuntu-24.04
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- name: Install devscripts
run: |
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources~
sudo sed -Ei 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt update -qq
sudo DEBIAN_FRONTEND=noninteractive apt -qq -y install devscripts equivs lintian
- name: Build libqgcodeeditor package
env:
DEBFULLNAME: "Jakob Flierl"
DEBEMAIL: "jakob.flierl@gmail.com"
run: |
git clone https://github.com/QGCoder/libqgcodeeditor
pushd libqgcodeeditor
export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME)
git fetch --tags
VERSION="$(git tag -l | tail -n1 | sed -e "s/^v//" -e "s/-/+git/")"
DEBEMAIL="${DEBEMAIL}" dch --create \
--distribution ${TARGET} \
--package libqgcodeeditor \
--newversion ${VERSION}~${TARGET}1 \
"Automatic release build"
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
dpkg-buildpackage -b -rfakeroot -us -uc
popd
- name: Install libqgcodeeditor
run: |
sudo dpkg -i libqgcodeeditor/*.deb
sudo apt -y -f install
- name: Build qgcoder package
env:
DEBFULLNAME: "Jakob Flierl"
DEBEMAIL: "jakob.flierl@gmail.com"
run: |
export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME)
VERSION="$(git tag -l | tail -n1 | sed -e "s/^v//" -e "s/-/+git/")"
DEBEMAIL="${DEBEMAIL}" dch --create \
--distribution ${TARGET} \
--package qgcoder \
--newversion ${VERSION}~${TARGET}1 \
"Automatic release build"
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
dpkg-buildpackage -b -rfakeroot -us -uc
- name: Upload artifacts
run: |
mkdir -p artifacts
cp *.buildinfo *.changes *.dsc *.tar.* *.deb artifacts/ 2>/dev/null || true
cp ../*.buildinfo ../*.changes ../*.dsc ../*.tar.* ../*.deb artifacts/ 2>/dev/null || true
cp libqgcodeeditor/*.buildinfo libqgcodeeditor/*.changes libqgcodeeditor/*.dsc libqgcodeeditor/*.tar.* libqgcodeeditor/*.deb artifacts/ 2>/dev/null || true
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
if-no-files-found: error
path: artifacts
release:
name: Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: '*'
path: artifacts
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}