-
-
Notifications
You must be signed in to change notification settings - Fork 23
66 lines (64 loc) · 1.82 KB
/
release.yml
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
name: Release
on:
push:
tags:
- v*
jobs:
build:
name: Build
runs-on: [ubuntu-20.04]
steps:
- name: Checkout Sources
uses: actions/checkout@v3
with:
path: udm-kernel-tools
submodules: recursive
- name: Setup Dependencies
run: |
sudo apt-get update
sudo apt-get install devscripts git gcc-aarch64-linux-gnu equivs
sudo mk-build-deps --install udm-kernel-tools/debian/control
- name: Build Package
run: |
cd udm-kernel-tools
debuild -eGITHUB_TOKEN -uc -us -aarm64 --lintian-opts --profile debian
env:
GITHUB_TOKEN: ${{secrets.PAT}}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
if-no-files-found: error
path: |
*.deb
*.build*
*.changes
*.dsc
release:
name: Publish Release
runs-on: [ubuntu-20.04]
needs: build
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build-artifacts
- name: Format Release Name
id: format_release
run: |
ref="${{ github.ref}}"
release_name=${ref#"refs/tags/"}
echo "release=$(scripts/version.sh)" >> $GITHUB_OUTPUT
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: udm-kernel-tools ${{ steps.format_release.outputs.release }}
body: ${{ steps.format_release.outputs.changelog }}
files: build-artifacts/udm-kernel-tools_*.deb