Skip to content

Commit

Permalink
Merge pull request #37 from shipengqi/feat/release
Browse files Browse the repository at this point in the history
fix(dependabot): update depnedabot configuration
  • Loading branch information
shipengqi committed May 11, 2024
2 parents 1f080cd + a8b50ff commit a544987
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:
labels:
- "dependencies"
commit-message:
prefix: "feat"
prefix: "chore"
include: "scope"
- package-ecosystem: "github-actions"
assignees:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ name: "codeql"
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
jobs:
analyze:
name: analyze
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ on:
push:
branches: ['main']
tags: ['v*']
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
permissions:
contents: read
jobs:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/grype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ on:
push:
branches: ['main']
tags: ['v*']
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
jobs:
scan-source:
name: scan-source
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ on:
- v*
branches:
- main
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
permissions:
contents: read

jobs:
golangci:
strategy:
matrix:
go: [ '1.20', '1.21' ]
go: [ '1.20', '1.21', '1.22' ]
os: [ ubuntu-latest, windows-latest ]
permissions:
contents: read # for actions/checkout to fetch code
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "release a version"
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # it is required fot the changelog to work correctly
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
distribution: goreleaser
version: latest
args: release --debug --clean

9 changes: 8 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name: test
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
pull_request:
branches: [ main ]

paths-ignore:
- 'docs/**'
- 'README.md'
- '.goreleaser.yaml'
jobs:
unit-test:
runs-on: ubuntu-latest
Expand Down
35 changes: 35 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
builds:
- # If true, skip the build.
# Useful for library projects.
skip: true
changelog:
sort: asc
use: github
filters:
exclude:
- '^Merge'
groups:
- title: 'New Features'
regexp: "^.*feat.*:+.*$"
order: 100
- title: 'Bug Fixes'
regexp: "^.*fix.*:+.*$"
order: 200
- title: 'Dependency Updates'
regexp: "^.*(feat|fix)\\(deps\\)*:+.*$"
order: 300
- title: 'Documentation Updates'
regexp: "^.*docs.*:+.*$"
order: 400
- title: Other work
order: 9999
release:
footer: |
**Full Changelog**: https://github.com/shipengqi/log/compare/{{ .PreviousTag }}...{{ .Tag }}
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

0 comments on commit a544987

Please sign in to comment.