Skip to content

Commit

Permalink
Add tagpr
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya Ueda committed Nov 13, 2024
1 parent 754868c commit 9fb6233
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
exclude:
labels:
- tagpr
16 changes: 16 additions & 0 deletions .github/workflows/tagpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# .github/workflows/tagpr.yml
name: tagpr
on:
push:
branches: ["main"]
jobs:
deploy:
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/[email protected]
- uses: Songmu/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/testandvet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test and Vet

on:
push:
branches:
- main
pull_request:
branches:
- main
- release-v2.*.*
release:
types:
- published
- created
- edited

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-24.04

steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.23.3

- name: Checkout code
uses: actions/[email protected]

- name: Cache Go module and build cache
uses: actions/[email protected]
with:
key: go-${{ hashFiles('**/go.sum') }}
path: |
~/go/pkg/mod
restore-keys: |
go-
- name: Install tennvet
run: |
GOBIN=$(pwd)/v2 go install github.com/tenntenn/tennvet@latest
- name: Test and vet
run: |
cd v2
go vet ./...
go vet -vettool=$(pwd)/tennvet ./...
go test -v -race ./...
35 changes: 35 additions & 0 deletions .tagpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# config file for the tagpr in git config format
# The tagpr generates the initial configuration, which you can rewrite to suit your environment.
# CONFIGURATIONS:
# tagpr.releaseBranch
# Generally, it is "main." It is the branch for releases. The pcpr tracks this branch,
# creates or updates a pull request as a release candidate, or tags when they are merged.
#
# tagpr.versionFile
# Versioning file containing the semantic version needed to be updated at release.
# It will be synchronized with the "git tag".
# Often this is a meta-information file such as gemspec, setup.cfg, package.json, etc.
# Sometimes the source code file, such as version.go or Bar.pm, is used.
# If you do not want to use versioning files but only git tags, specify the "-" string here.
# You can specify multiple version files by comma separated strings.
#
# tagpr.vPrefix
# Flag whether or not v-prefix is added to semver when git tagging. (e.g. v1.2.3 if true)
# This is only a tagging convention, not how it is described in the version file.
#
# tagpr.changelog (Optional)
# Flag whether or not changelog is added or changed during the release.
#
# tagpr.command (Optional)
# Command to change files just before release.
#
# tagpr.tmplate (Optional)
# Pull request template in go template format
#
# tagpr.release (Optional)
# GitHub Release creation behavior after tagging [true, draft, false]
# If this value is not set, the release is to be created.
[tagpr]
vPrefix = true
releaseBranch = main
versionFile = version.txt
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gostaticanalysis/skeletonkit

go 1.17
go 1.23.3

require (
github.com/josharian/txtarfs v0.0.0-20210615234325-77aca6df5bca
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.4.0

0 comments on commit 9fb6233

Please sign in to comment.