4
4
tags :
5
5
- " v*"
6
6
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.ref }}
9
+ cancel-in-progress : true
10
+
7
11
jobs :
8
12
9
13
build-on-ubuntu2204 :
16
20
- name : Install Compilers
17
21
run : |
18
22
sudo apt-get update
19
- sudo apt-get install --yes build-essential pkgconf libelf-dev llvm-14 clang-14 linux-tools-common linux-tools-generic gcc gcc-aarch64-linux-gnu linux-source
23
+ sudo apt-get install --yes --no-install-recommends \
24
+ build-essential \
25
+ pkgconf \
26
+ libelf-dev \
27
+ llvm-14 \
28
+ clang-14 \
29
+ linux-tools-common \
30
+ linux-tools-generic \
31
+ gcc \
32
+ gcc-aarch64-linux-gnu \
33
+ linux-source
20
34
for tool in "clang" "llc" "llvm-strip"
21
35
do
22
36
sudo rm -f /usr/bin/$tool
@@ -35,22 +49,39 @@ jobs:
35
49
with :
36
50
submodules : ' recursive'
37
51
fetch-depth : 0
52
+ - uses : actions/cache@v4
53
+ with :
54
+ path : |
55
+ ~/.cache/go-build
56
+ ~/go/pkg/mod
57
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
58
+ restore-keys : |
59
+ ${{ runner.os }}-go-
38
60
- name : authenticate
39
61
run : |
40
62
gh auth login --with-token <<<'${{ secrets.GITHUB_TOKEN }}'
41
- - name : Build Changelog
42
- id : github_release
43
- uses : mikepenz/release-changelog-builder-action@v1
44
- with :
45
- configuration : " configuration.json"
46
- env :
47
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63
+ - name : Get Previous Tag
64
+ id : previoustag
65
+ run : |
66
+ PREVIOUS=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
67
+ echo "PREVIOUS_TAG=$PREVIOUS" >> $GITHUB_OUTPUT
68
+ - name : Generate Release Notes
69
+ id : release_notes
70
+ run : |
71
+ gh api \
72
+ --method POST \
73
+ -H "Accept: application/vnd.github+json" \
74
+ /repos/${{ github.repository }}/releases/generate-notes \
75
+ -f tag_name=${{ github.ref_name }} \
76
+ -f previous_tag_name=${{ steps.previoustag.outputs.PREVIOUS_TAG }} \
77
+ > release_notes.json
78
+ echo "NOTES=$(jq -r .body release_notes.json)" >> $GITHUB_OUTPUT
48
79
- name : Write File
49
80
uses :
DamianReeves/[email protected]
50
81
with :
51
82
path : ./bin/release_notes.txt
52
83
contents : |
53
- ${{ steps.github_release .outputs.changelog }}
84
+ ${{ steps.release_notes .outputs.NOTES }}
54
85
write-mode : append
55
86
- name : Release amd64
56
87
run : |
89
120
file : ./builder/Dockerfile
90
121
platforms : linux/amd64,linux/arm64
91
122
push : true
123
+ cache-from : type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/ecapture:buildcache
124
+ cache-to : type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/ecapture:buildcache,mode=max
92
125
tags : |
93
126
${{ secrets.DOCKERHUB_USERNAME }}/ecapture:${{ github.ref_name }}
94
127
${{ secrets.DOCKERHUB_USERNAME }}/ecapture:latest
0 commit comments