@@ -10,8 +10,38 @@ permissions:
10
10
packages : write
11
11
12
12
jobs :
13
+ reproducibility-test :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - name : Set up Go
22
+ uses : actions/setup-go@v5
23
+ with :
24
+ go-version : ' 1.24'
25
+ cache : true
26
+
27
+ - name : Set SOURCE_DATE_EPOCH for reproducible builds
28
+ run : echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> $GITHUB_ENV
29
+
30
+ - name : Test reproducible builds
31
+ run : |
32
+ # Install GoReleaser
33
+ go install github.com/goreleaser/goreleaser/v2@latest
34
+
35
+ # Run reproducibility test
36
+ make package-test-reproducible
37
+
38
+ echo "✅ Reproducibility test passed"
39
+ env :
40
+ SOURCE_DATE_EPOCH : ${{ env.SOURCE_DATE_EPOCH }}
41
+
13
42
release :
14
43
runs-on : ubuntu-latest
44
+ needs : reproducibility-test # Only run if reproducibility test passes
15
45
steps :
16
46
- name : Checkout
17
47
uses : actions/checkout@v4
@@ -102,34 +132,3 @@ jobs:
102
132
echo "❌ No AMD64 .deb file found for testing"
103
133
exit 1
104
134
fi
105
-
106
- reproducibility-test :
107
- runs-on : ubuntu-latest
108
- needs : release
109
- if : always()
110
- steps :
111
- - name : Checkout
112
- uses : actions/checkout@v4
113
- with :
114
- fetch-depth : 0
115
-
116
- - name : Set up Go
117
- uses : actions/setup-go@v5
118
- with :
119
- go-version : ' 1.24'
120
- cache : true
121
-
122
- - name : Set SOURCE_DATE_EPOCH for reproducible builds
123
- run : echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> $GITHUB_ENV
124
-
125
- - name : Test reproducible builds
126
- run : |
127
- # Install GoReleaser
128
- go install github.com/goreleaser/goreleaser/v2@latest
129
-
130
- # Run reproducibility test
131
- make package-test-reproducible
132
-
133
- echo "✅ Reproducibility test passed"
134
- env :
135
- SOURCE_DATE_EPOCH : ${{ env.SOURCE_DATE_EPOCH }}
0 commit comments