Skip to content

Commit 50a600e

Browse files
committed
.github/workflows: improve release reproducibility
Remove the go-version-file test target, because it will just use the toolchain line. It's a bit unfortunate we lose coverage of a go.mod version that's older than oldstable, but that should not happen and it'd not be a supported Go version anyway.
1 parent 13aab81 commit 50a600e

File tree

4 files changed

+39
-12
lines changed

4 files changed

+39
-12
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
---
3+
4+
Copyright 2009 The Go Authors.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are
8+
met:
9+
10+
* Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above
13+
copyright notice, this list of conditions and the following disclaimer
14+
in the documentation and/or other materials provided with the
15+
distribution.
16+
* Neither the name of Google LLC nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,18 @@ jobs:
2626
fetch-depth: 0
2727
persist-credentials: false
2828
- name: Install Go
29-
uses: actions/setup-go@v5
29+
uses: actions/setup-go@v6
3030
with:
31-
go-version: 1.x
31+
go-version-file: go.mod
3232
cache: false
3333
- name: Build binary
3434
run: |
35-
cp LICENSE "$RUNNER_TEMP/LICENSE"
36-
echo -e "\n---\n" >> "$RUNNER_TEMP/LICENSE"
37-
curl -L "https://go.dev/LICENSE?m=text" >> "$RUNNER_TEMP/LICENSE"
3835
VERSION="$(git describe --tags)"
3936
DIR="$(mktemp -d)"
4037
mkdir "$DIR/age"
41-
cp "$RUNNER_TEMP/LICENSE" "$DIR/age"
4238
go build -o "$DIR/age" -trimpath ./cmd/...
39+
cp LICENSE "$DIR/age/LICENSE"
40+
cat .github/workflows/LICENSE.suffix.txt >> "$DIR/age/LICENSE"
4341
if [ "$GOOS" == "windows" ]; then
4442
sudo apt-get update && sudo apt-get install -y osslsigncode
4543
if [ -n "${{ secrets.SIGN_PASS }}" ]; then
@@ -77,9 +75,9 @@ jobs:
7775
fetch-depth: 0
7876
persist-credentials: false
7977
- name: Install Go
80-
uses: actions/setup-go@v5
78+
uses: actions/setup-go@v6
8179
with:
82-
go-version: 1.x
80+
go-version-file: go.mod
8381
cache: false
8482
- name: Create source tarball
8583
run: |

.github/workflows/test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
go:
1616
- { go-version: stable }
1717
- { go-version: oldstable }
18-
- { go-version-file: go.mod }
1918
os:
2019
- ubuntu-latest
2120
- macos-latest
@@ -28,7 +27,6 @@ jobs:
2827
- uses: actions/setup-go@v6
2928
with:
3029
go-version: ${{ matrix.go.go-version }}
31-
go-version-file: ${{ matrix.go.go-version-file }}
3230
- run: |
3331
go test -race ./...
3432
test-latest:
@@ -39,15 +37,13 @@ jobs:
3937
go:
4038
- { go-version: stable }
4139
- { go-version: oldstable }
42-
- { go-version-file: go.mod }
4340
steps:
4441
- uses: actions/checkout@v5
4542
with:
4643
persist-credentials: false
4744
- uses: actions/setup-go@v6
4845
with:
4946
go-version: ${{ matrix.go.go-version }}
50-
go-version-file: ${{ matrix.go.go-version-file }}
5147
- uses: geomys/[email protected]
5248
with:
5349
run: |

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module filippo.io/age
22

33
go 1.24.0
44

5+
// Release build version.
6+
toolchain go1.25.5
7+
58
require (
69
filippo.io/edwards25519 v1.1.0
710
filippo.io/hpke v0.4.0

0 commit comments

Comments
 (0)