-
-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (72 loc) · 2.05 KB
/
release.yml
File metadata and controls
81 lines (72 loc) · 2.05 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: ${{ matrix.target }}-${{ matrix.qt-version }}
strategy:
fail-fast: false
matrix:
target:
- ubuntu-latest
qt-version:
- qt5
- qt6
runs-on: ${{ matrix.target }}
env:
qt6: ${{ matrix.qt-version == 'qt6' && 'yes' || 'no' }}
steps:
- uses: actions/checkout@v3
- name: Install devscripts
run: |
sudo apt -qq update
sudo apt -y dist-upgrade
sudo DEBIAN_FRONTEND=noninteractive apt install -qq devscripts equivs lintian
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
- name: Build package
env:
DEBFULLNAME: "Jakob Flierl"
DEBEMAIL: "jakob.flierl@gmail.com"
run: |
export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME)
git fetch --unshallow
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"
dpkg-buildpackage -b -rfakeroot -us -uc
- name: Upload artifacts
run: |
mkdir -p artifacts
cp ../*.buildinfo ../*.changes ../*.dsc ../*.tar.* ../*.deb artifacts/ 2>/dev/null || true
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}-${{ matrix.qt-version }}
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 }}