detached 513f4cf

ci: drop the auto-tag policy test and run macOS and Windows on GitHub only

next-release-tag.sh only served the removed daily auto-tag job. ermite has no macOS or Windows runner, so those matrix legs run on the GitHub mirror.
commit
513f4cf9f5a8303faf347fc2e2f2ab870d560eed
author
brice · · 2026-10-22 09:18 UTC
parent
5ac6a24
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
checks
0/1
4 files · +2 -116
M .forgejo/workflows/ci.yml +0 -3
@@ -41,9 +41,6 @@ jobs:
4141 - name: go test
4242 run: go test -race ./...
4343
44- - name: release-version policy
45- run: bash .github/scripts/next-release-tag_test.sh
46-
4744 - name: golangci-lint
4845 uses: golangci/golangci-lint-action@v9.3.0
4946 with:
@@ -41,9 +41,6 @@ jobs:
41 - name: go test41 - name: go test
42 run: go test -race ./...42 run: go test -race ./...
43 43
44- - name: release-version policy
45- run: bash .github/scripts/next-release-tag_test.sh
46-
47 - name: golangci-lint44 - name: golangci-lint
48 uses: golangci/golangci-lint-action@v9.3.045 uses: golangci/golangci-lint-action@v9.3.0
49 with:46 with:
D .github/scripts/next-release-tag.sh +0 -60
@@ -1,60 +0,0 @@
1-#!/usr/bin/env bash
2-# Print the release tag for HEAD, or nothing when its unreleased commits do not
3-# require a release. A tag already pointing to HEAD is emitted again so a
4-# failed GoReleaser job can be retried without minting a second tag.
5-set -euo pipefail
6-
7-latest=$(git tag --list 'v*.*.*' --sort=-v:refname | head -n1)
8-head=$(git rev-parse HEAD)
9-if [ -n "$latest" ] && [ "$(git rev-parse "$latest^{}")" = "$head" ]; then
10- printf '%s\n' "$latest"
11- exit 0
12-fi
13-
14-if [ -n "$latest" ]; then
15- range="${latest}..HEAD"
16-else
17- range="HEAD"
18-fi
19-
20-minor=false
21-patch=false
22-while IFS= read -r commit; do
23- subject=$(git log -1 --format=%s "$commit")
24- body=$(git log -1 --format=%b "$commit")
25-
26- # A breaking change is a v0.x minor release.
27- if grep -Eq '^[[:alpha:]]+(\([^)]+\))?!:' <<<"$subject" || grep -Eiq '^BREAKING[ -]CHANGE:' <<<"$body"; then
28- minor=true
29- continue
30- fi
31-
32- type=${subject%%(*}
33- type=${type%%:*}
34- type=${type%%!*}
35- type=$(tr '[:upper:]' '[:lower:]' <<<"$type")
36- case "$type" in
37- feat) minor=true ;;
38- fix|perf|refactor|build|chore|ci) patch=true ;;
39- docs|test|style) ;;
40- *) ;;
41- esac
42-done < <(git rev-list "$range")
43-
44-if [ "$minor" != true ] && [ "$patch" != true ]; then
45- exit 0
46-fi
47-
48-# The renamed project starts a new public release line at v0.1.0.
49-if [ -z "$latest" ]; then
50- printf '%s\n' 'v0.1.0'
51- exit 0
52-fi
53-
54-version=${latest#v}
55-IFS=. read -r major minor_version patch_version <<<"$version"
56-if [ "$minor" = true ]; then
57- printf 'v%s.%s.0\n' "$major" "$((minor_version + 1))"
58-else
59- printf 'v%s.%s.%s\n' "$major" "$minor_version" "$((patch_version + 1))"
60-fi
@@ -1,60 +0,0 @@
1-#!/usr/bin/env bash
2-# Print the release tag for HEAD, or nothing when its unreleased commits do not
3-# require a release. A tag already pointing to HEAD is emitted again so a
4-# failed GoReleaser job can be retried without minting a second tag.
5-set -euo pipefail
6-
7-latest=$(git tag --list 'v*.*.*' --sort=-v:refname | head -n1)
8-head=$(git rev-parse HEAD)
9-if [ -n "$latest" ] && [ "$(git rev-parse "$latest^{}")" = "$head" ]; then
10- printf '%s\n' "$latest"
11- exit 0
12-fi
13-
14-if [ -n "$latest" ]; then
15- range="${latest}..HEAD"
16-else
17- range="HEAD"
18-fi
19-
20-minor=false
21-patch=false
22-while IFS= read -r commit; do
23- subject=$(git log -1 --format=%s "$commit")
24- body=$(git log -1 --format=%b "$commit")
25-
26- # A breaking change is a v0.x minor release.
27- if grep -Eq '^[[:alpha:]]+(\([^)]+\))?!:' <<<"$subject" || grep -Eiq '^BREAKING[ -]CHANGE:' <<<"$body"; then
28- minor=true
29- continue
30- fi
31-
32- type=${subject%%(*}
33- type=${type%%:*}
34- type=${type%%!*}
35- type=$(tr '[:upper:]' '[:lower:]' <<<"$type")
36- case "$type" in
37- feat) minor=true ;;
38- fix|perf|refactor|build|chore|ci) patch=true ;;
39- docs|test|style) ;;
40- *) ;;
41- esac
42-done < <(git rev-list "$range")
43-
44-if [ "$minor" != true ] && [ "$patch" != true ]; then
45- exit 0
46-fi
47-
48-# The renamed project starts a new public release line at v0.1.0.
49-if [ -z "$latest" ]; then
50- printf '%s\n' 'v0.1.0'
51- exit 0
52-fi
53-
54-version=${latest#v}
55-IFS=. read -r major minor_version patch_version <<<"$version"
56-if [ "$minor" = true ]; then
57- printf 'v%s.%s.0\n' "$major" "$((minor_version + 1))"
58-else
59- printf 'v%s.%s.%s\n' "$major" "$minor_version" "$((patch_version + 1))"
60-fi
D .github/scripts/next-release-tag_test.sh +0 -48
@@ -1,48 +0,0 @@
1-#!/usr/bin/env bash
2-set -euo pipefail
3-
4-repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
5-script="$repo_root/.github/scripts/next-release-tag.sh"
6-tmp=$(mktemp -d)
7-trap 'rm -rf "$tmp"' EXIT
8-
9-cd "$tmp"
10-git init --quiet
11-git config user.name 'Release Test'
12-git config user.email 'release-test@example.invalid'
13-
14-git commit --allow-empty --quiet -m 'feat: first release'
15-expect() {
16- local want=$1
17- local got
18- got=$($script)
19- if [ "$got" != "$want" ]; then
20- printf 'next-release-tag = %q, want %q\n' "$got" "$want" >&2
21- exit 1
22- fi
23-}
24-
25-expect 'v0.1.0'
26-git tag -a v0.1.0 -m 'release v0.1.0'
27-
28-# A rerun after tag creation must release the existing tag, not skip it.
29-expect 'v0.1.0'
30-
31-git commit --allow-empty --quiet -m 'docs: explain releases'
32-expect ''
33-
34-git commit --allow-empty --quiet -m 'fix: repair installer'
35-expect 'v0.1.1'
36-git tag -a v0.1.1 -m 'release v0.1.1'
37-
38-git commit --allow-empty --quiet -m 'refactor!: replace extension handshake'
39-expect 'v0.2.0'
40-
41-# GoReleaser passes tag_sort directly to `git tag --sort`, so keep the
42-# configured semantic-version sort valid before a release run depends on it.
43-tag_sort=$(sed -n 's/^[[:space:]]*tag_sort:[[:space:]]*//p' "$repo_root/.goreleaser.yaml")
44-if [ "$tag_sort" != '-version:refname' ]; then
45- printf 'goreleaser tag_sort = %q, want %q\n' "$tag_sort" '-version:refname' >&2
46- exit 1
47-fi
48-git tag --sort "$tag_sort" --list 'v*.*.*' >/dev/null
@@ -1,48 +0,0 @@
1-#!/usr/bin/env bash
2-set -euo pipefail
3-
4-repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
5-script="$repo_root/.github/scripts/next-release-tag.sh"
6-tmp=$(mktemp -d)
7-trap 'rm -rf "$tmp"' EXIT
8-
9-cd "$tmp"
10-git init --quiet
11-git config user.name 'Release Test'
12-git config user.email 'release-test@example.invalid'
13-
14-git commit --allow-empty --quiet -m 'feat: first release'
15-expect() {
16- local want=$1
17- local got
18- got=$($script)
19- if [ "$got" != "$want" ]; then
20- printf 'next-release-tag = %q, want %q\n' "$got" "$want" >&2
21- exit 1
22- fi
23-}
24-
25-expect 'v0.1.0'
26-git tag -a v0.1.0 -m 'release v0.1.0'
27-
28-# A rerun after tag creation must release the existing tag, not skip it.
29-expect 'v0.1.0'
30-
31-git commit --allow-empty --quiet -m 'docs: explain releases'
32-expect ''
33-
34-git commit --allow-empty --quiet -m 'fix: repair installer'
35-expect 'v0.1.1'
36-git tag -a v0.1.1 -m 'release v0.1.1'
37-
38-git commit --allow-empty --quiet -m 'refactor!: replace extension handshake'
39-expect 'v0.2.0'
40-
41-# GoReleaser passes tag_sort directly to `git tag --sort`, so keep the
42-# configured semantic-version sort valid before a release run depends on it.
43-tag_sort=$(sed -n 's/^[[:space:]]*tag_sort:[[:space:]]*//p' "$repo_root/.goreleaser.yaml")
44-if [ "$tag_sort" != '-version:refname' ]; then
45- printf 'goreleaser tag_sort = %q, want %q\n' "$tag_sort" '-version:refname' >&2
46- exit 1
47-fi
48-git tag --sort "$tag_sort" --list 'v*.*.*' >/dev/null
M .github/workflows/ci.yml +2 -5
@@ -19,7 +19,8 @@ jobs:
1919 strategy:
2020 fail-fast: false
2121 matrix:
22- os: [ubuntu-latest, macos-latest, windows-latest]
22+ # ermite has no macOS or Windows runner: those legs run on GitHub only.
23+ os: ${{ fromJSON(github.server_url == 'https://github.com' && '["ubuntu-latest","macos-latest","windows-latest"]' || '["ubuntu-latest"]') }}
2324 steps:
2425 - uses: actions/checkout@v4
2526
@@ -49,10 +50,6 @@ jobs:
4950
5051 # Keep Linux-only quality checks in the Ubuntu test job so CI needs
5152 # only the three platform runners.
52- - name: release-version policy
53- if: matrix.os == 'ubuntu-latest'
54- run: bash .github/scripts/next-release-tag_test.sh
55-
5653 - name: golangci-lint
5754 if: matrix.os == 'ubuntu-latest'
5855 uses: golangci/golangci-lint-action@v9.3.0
@@ -19,7 +19,8 @@ jobs:
19 strategy:19 strategy:
20 fail-fast: false20 fail-fast: false
21 matrix:21 matrix:
22- os: [ubuntu-latest, macos-latest, windows-latest]22+ # ermite has no macOS or Windows runner: those legs run on GitHub only.
23+ os: ${{ fromJSON(github.server_url == 'https://github.com' && '["ubuntu-latest","macos-latest","windows-latest"]' || '["ubuntu-latest"]') }}
23 steps:24 steps:
24 - uses: actions/checkout@v425 - uses: actions/checkout@v4
25 26
@@ -49,10 +50,6 @@ jobs:
49 50
50 # Keep Linux-only quality checks in the Ubuntu test job so CI needs51 # Keep Linux-only quality checks in the Ubuntu test job so CI needs
51 # only the three platform runners.52 # only the three platform runners.
52- - name: release-version policy
53- if: matrix.os == 'ubuntu-latest'
54- run: bash .github/scripts/next-release-tag_test.sh
55-
56 - name: golangci-lint53 - name: golangci-lint
57 if: matrix.os == 'ubuntu-latest'54 if: matrix.os == 'ubuntu-latest'
58 uses: golangci/golangci-lint-action@v9.3.055 uses: golangci/golangci-lint-action@v9.3.0

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close