.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.
This commit is contained in:
Filippo Valsorda 2025-12-27 10:34:26 +01:00
parent 13aab81842
commit 50a600eef5
4 changed files with 39 additions and 12 deletions

30
.github/workflows/LICENSE.suffix.txt vendored Normal file
View file

@ -0,0 +1,30 @@
---
Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -26,20 +26,18 @@ jobs:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: 1.x go-version-file: go.mod
cache: false cache: false
- name: Build binary - name: Build binary
run: | run: |
cp LICENSE "$RUNNER_TEMP/LICENSE"
echo -e "\n---\n" >> "$RUNNER_TEMP/LICENSE"
curl -L "https://go.dev/LICENSE?m=text" >> "$RUNNER_TEMP/LICENSE"
VERSION="$(git describe --tags)" VERSION="$(git describe --tags)"
DIR="$(mktemp -d)" DIR="$(mktemp -d)"
mkdir "$DIR/age" mkdir "$DIR/age"
cp "$RUNNER_TEMP/LICENSE" "$DIR/age"
go build -o "$DIR/age" -trimpath ./cmd/... go build -o "$DIR/age" -trimpath ./cmd/...
cp LICENSE "$DIR/age/LICENSE"
cat .github/workflows/LICENSE.suffix.txt >> "$DIR/age/LICENSE"
if [ "$GOOS" == "windows" ]; then if [ "$GOOS" == "windows" ]; then
sudo apt-get update && sudo apt-get install -y osslsigncode sudo apt-get update && sudo apt-get install -y osslsigncode
if [ -n "${{ secrets.SIGN_PASS }}" ]; then if [ -n "${{ secrets.SIGN_PASS }}" ]; then
@ -77,9 +75,9 @@ jobs:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: 1.x go-version-file: go.mod
cache: false cache: false
- name: Create source tarball - name: Create source tarball
run: | run: |

View file

@ -15,7 +15,6 @@ jobs:
go: go:
- { go-version: stable } - { go-version: stable }
- { go-version: oldstable } - { go-version: oldstable }
- { go-version-file: go.mod }
os: os:
- ubuntu-latest - ubuntu-latest
- macos-latest - macos-latest
@ -28,7 +27,6 @@ jobs:
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: ${{ matrix.go.go-version }} go-version: ${{ matrix.go.go-version }}
go-version-file: ${{ matrix.go.go-version-file }}
- run: | - run: |
go test -race ./... go test -race ./...
test-latest: test-latest:
@ -39,7 +37,6 @@ jobs:
go: go:
- { go-version: stable } - { go-version: stable }
- { go-version: oldstable } - { go-version: oldstable }
- { go-version-file: go.mod }
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
@ -47,7 +44,6 @@ jobs:
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: ${{ matrix.go.go-version }} go-version: ${{ matrix.go.go-version }}
go-version-file: ${{ matrix.go.go-version-file }}
- uses: geomys/sandboxed-step@v1.2.1 - uses: geomys/sandboxed-step@v1.2.1
with: with:
run: | run: |

3
go.mod
View file

@ -2,6 +2,9 @@ module filippo.io/age
go 1.24.0 go 1.24.0
// Release build version.
toolchain go1.25.5
require ( require (
filippo.io/edwards25519 v1.1.0 filippo.io/edwards25519 v1.1.0
filippo.io/hpke v0.4.0 filippo.io/hpke v0.4.0