@@ -10,8 +10,38 @@ permissions:
1010 packages : write
1111
1212jobs :
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+
1342 release :
1443 runs-on : ubuntu-latest
44+ needs : reproducibility-test # Only run if reproducibility test passes
1545 steps :
1646 - name : Checkout
1747 uses : actions/checkout@v4
@@ -102,34 +132,3 @@ jobs:
102132 echo "❌ No AMD64 .deb file found for testing"
103133 exit 1
104134 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