Skip to content

Commit

Permalink
Add Github actions support (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
destel authored Mar 18, 2024
1 parent da42468 commit df77820
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
changelog:
categories:
- title: ➕ New
labels: ["new"]
- title: 🐛 Fixes
labels: ["fix", "bug"]
- title: 📝 Dependencies
labels: ["dependencies"]
- title: 📦 Other
labels: ["*"]
31 changes: 31 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check

on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]


jobs:
gotest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Cache go packages
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-
${{ runner.os }}-go-
- name: Run tests
run: go test -v ./...
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
push:
tags:
- "v*.*.*"
- "v*.*.*-*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
name: ${{ env.GITHUB_TAG }}
prerelease: ${{ contains(github.ref, '-') }}
generate_release_notes: true

0 comments on commit df77820

Please sign in to comment.