Skip to content

Commit

Permalink
add github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
usk81 committed Aug 14, 2022
1 parent e6f61b7 commit 0376b7d
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "20:00"
open-pull-requests-limit: 10
reviewers:
- usk81
assignees:
- usk81
# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- usk81
assignees:
- usk81
commit-message:
prefix: fix
prefix-development: chore
include: scope
27 changes: 27 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'feature'
labels:
- 'feature'
- title: 'bugfix'
labels:
- 'bugfix'
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
exclude-labels:
- 'skip-changelog'
template: |
## Changes
$CHANGES
47 changes: 47 additions & 0 deletions .github/workflow/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: review
on:
- pull_request

jobs:
golangci:
name: linter
strategy:
matrix:
go-version: [1.18.x,1.19.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.48.0
# Optional: golangci-lint command line arguments.
args: --enable=goimports
skip-go-installation: true
test:
name: test
strategy:
matrix:
go-version: [1.18.x,1.19.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.os }}-go-
- name: Test
run: go test -v ./...
20 changes: 20 additions & 0 deletions .github/workflow/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0376b7d

Please sign in to comment.