Skip to content

Commit 5dce391

Browse files
authored
Merge pull request #61 from coreosbot-releng/repo-templates
Sync repo templates ⚙
2 parents 8818177 + c453492 commit 5dce391

File tree

5 files changed

+107
-18
lines changed

5 files changed

+107
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
# Template generated by https://github.com/coreos/repo-templates; do not edit downstream
3+
---
4+
5+
Release checklist:
6+
7+
Tagging:
8+
- [ ] Write release notes in `docs/release-notes.md`. Get them reviewed and merged
9+
- [ ] If doing a branched release, also include a PR to merge the `docs/release-notes.md` changes into main
10+
- [ ] Ensure your local copy is up to date with the upstream main branch (`[email protected]:coreos/stream-metadata-go.git`)
11+
- [ ] Ensure your working directory is clean (`git clean -fdx`)
12+
- [ ] Ensure you can sign commits and any yubikeys/smartcards are plugged in
13+
- [ ] Run `./tag_release.sh <vX.Y.z> <git commit hash>`
14+
- [ ] Push that tag to GitHub
15+
16+
GitHub release:
17+
- [ ] Find the new tag in the [GitHub tag list](https://github.com/coreos/stream-metadata-go/tags) and click the triple dots menu, and create a draft release for it.
18+
- [ ] Copy and paste the release notes from `docs/release-notes.md`
19+
- [ ] Publish the release

.github/dependabot.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# Maintained in https://github.com/coreos/repo-templates
2+
# Do not edit downstream.
3+
14
version: 2
25
updates:
3-
- package-ecosystem: gomod
4-
directory: /
5-
schedule:
6-
interval: weekly
7-
open-pull-requests-limit: 10
8-
labels:
9-
- dependency
6+
- package-ecosystem: gomod
7+
directory: /
8+
schedule:
9+
interval: weekly
10+
open-pull-requests-limit: 10
11+
labels:
12+
- dependency
13+
- skip-notes

.github/workflows/go.yml

+21-11
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1-
name: Go
1+
# Maintained in https://github.com/coreos/repo-templates
2+
# Do not edit downstream.
23

4+
name: Go
35
on:
46
push:
57
branches: [main]
68
pull_request:
79
branches: [main]
8-
910
permissions:
1011
contents: read
1112

13+
# don't waste job slots on superseded code
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1218
jobs:
13-
test-build:
14-
name: test build
19+
test:
20+
name: Test
1521
strategy:
1622
matrix:
1723
go-version: [1.18.x, 1.19.x, 1.20.x]
1824
os: [ubuntu-latest]
1925
include:
20-
- go-version: 1.20.x
21-
os: macos-latest
22-
- go-version: 1.20.x
23-
os: windows-latest
26+
- go-version: 1.20.x
27+
os: macos-latest
28+
- go-version: 1.20.x
29+
os: windows-latest
2430
runs-on: ${{ matrix.os }}
2531
steps:
2632
- name: Set up Go 1.x
2733
uses: actions/setup-go@v4
2834
with:
2935
go-version: ${{ matrix.go-version }}
30-
- name: Checkout Repository
36+
- name: Check out repository
3137
uses: actions/checkout@v3
38+
- name: Check modules
39+
run: go mod verify
3240
- name: Build
41+
shell: bash
3342
run: make
3443
- name: Test
44+
shell: bash
3545
run: make test
3646
- name: Run linter
3747
uses: golangci/golangci-lint-action@v3
38-
if: ${{ matrix.os == 'ubuntu-latest' }}
48+
if: runner.os == 'Linux'
3949
with:
40-
version: v1.51.1
50+
version: v1.52.2
4151
args: -E=gofmt --timeout=30m0s
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Maintained in https://github.com/coreos/repo-templates
2+
# Do not edit downstream.
3+
4+
name: Release notes
5+
6+
on:
7+
pull_request:
8+
branches: [main]
9+
types: [opened, synchronize, reopened, labeled, unlabeled]
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: release-note-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
require-notes:
20+
name: Require release note
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Require release-notes.md update
24+
uses: coreos/actions-lib/require-file-change@main
25+
with:
26+
path: docs/release-notes.md
27+
override-label: skip-notes

tag_release.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
# Maintained in https://github.com/coreos/repo-templates
3+
# Do not edit downstream.
4+
5+
set -e
6+
7+
[ $# == 2 ] || { echo "usage: $0 <version> <commit>" && exit 1; }
8+
9+
VER=$1
10+
COMMIT=$2
11+
12+
[[ "${VER}" =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]] || {
13+
echo "malformed version: \"${VER}\""
14+
exit 2
15+
}
16+
17+
[[ "${COMMIT}" =~ ^[[:xdigit:]]+$ ]] || {
18+
echo "malformed commit id: \"${COMMIT}\""
19+
exit 3
20+
}
21+
22+
if [ -f Makefile ]; then
23+
make
24+
else
25+
./build
26+
fi
27+
28+
git tag --sign --message "stream-metadata-go ${VER}" "${VER}" "${COMMIT}"
29+
git verify-tag --verbose "${VER}"

0 commit comments

Comments
 (0)