Skip to content

Commit

Permalink
Merge pull request #61 from coreosbot-releng/repo-templates
Browse files Browse the repository at this point in the history
Sync repo templates ⚙
  • Loading branch information
bgilbert authored May 30, 2023
2 parents 8818177 + c453492 commit 5dce391
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 18 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Template generated by https://github.com/coreos/repo-templates; do not edit downstream
---

Release checklist:

Tagging:
- [ ] Write release notes in `docs/release-notes.md`. Get them reviewed and merged
- [ ] If doing a branched release, also include a PR to merge the `docs/release-notes.md` changes into main
- [ ] Ensure your local copy is up to date with the upstream main branch (`[email protected]:coreos/stream-metadata-go.git`)
- [ ] Ensure your working directory is clean (`git clean -fdx`)
- [ ] Ensure you can sign commits and any yubikeys/smartcards are plugged in
- [ ] Run `./tag_release.sh <vX.Y.z> <git commit hash>`
- [ ] Push that tag to GitHub

GitHub release:
- [ ] 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.
- [ ] Copy and paste the release notes from `docs/release-notes.md`
- [ ] Publish the release
18 changes: 11 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependency
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependency
- skip-notes
32 changes: 21 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,51 @@
name: Go
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

# don't waste job slots on superseded code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-build:
name: test build
test:
name: Test
strategy:
matrix:
go-version: [1.18.x, 1.19.x, 1.20.x]
os: [ubuntu-latest]
include:
- go-version: 1.20.x
os: macos-latest
- go-version: 1.20.x
os: windows-latest
- go-version: 1.20.x
os: macos-latest
- go-version: 1.20.x
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Repository
- name: Check out repository
uses: actions/checkout@v3
- name: Check modules
run: go mod verify
- name: Build
shell: bash
run: make
- name: Test
shell: bash
run: make test
- name: Run linter
uses: golangci/golangci-lint-action@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
if: runner.os == 'Linux'
with:
version: v1.51.1
version: v1.52.2
args: -E=gofmt --timeout=30m0s
27 changes: 27 additions & 0 deletions .github/workflows/require-release-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

name: Release notes

on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled, unlabeled]

permissions:
contents: read

concurrency:
group: release-note-${{ github.ref }}
cancel-in-progress: true

jobs:
require-notes:
name: Require release note
runs-on: ubuntu-latest
steps:
- name: Require release-notes.md update
uses: coreos/actions-lib/require-file-change@main
with:
path: docs/release-notes.md
override-label: skip-notes
29 changes: 29 additions & 0 deletions tag_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

set -e

[ $# == 2 ] || { echo "usage: $0 <version> <commit>" && exit 1; }

VER=$1
COMMIT=$2

[[ "${VER}" =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]] || {
echo "malformed version: \"${VER}\""
exit 2
}

[[ "${COMMIT}" =~ ^[[:xdigit:]]+$ ]] || {
echo "malformed commit id: \"${COMMIT}\""
exit 3
}

if [ -f Makefile ]; then
make
else
./build
fi

git tag --sign --message "stream-metadata-go ${VER}" "${VER}" "${COMMIT}"
git verify-tag --verbose "${VER}"

0 comments on commit 5dce391

Please sign in to comment.