diff --git a/.github/workflows/check-go.yml b/.github/workflows/check-go.yml new file mode 100644 index 0000000..a6e41e8 --- /dev/null +++ b/.github/workflows/check-go.yml @@ -0,0 +1,50 @@ +name: Check Go code + +on: + push: + branches: + - master + paths: + - '**.go' + +permissions: + contents: read + +jobs: + + build: + name: Build and test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.x' + + - name: Download dependencies + run: go mod download + + - name: Run tests + run: go test ./... + + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.x' + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v8 + with: + version: 'v2.1' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..870ab54 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + + release: + name: Automatic release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create the release + uses: softprops/action-gh-release@v2 diff --git a/README.md b/README.md index 8febd01..7759850 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# :performing_arts: anon3anon [![GitHub License](https://img.shields.io/github/license/nightnoryu/anon3anon)](https://opensource.org/license/MIT) [![Go Report Card](https://goreportcard.com/badge/github.com/nightnoryu/anon3anon)](https://goreportcard.com/report/github.com/nightnoryu/anon3anon) +# :performing_arts: anon3anon [![Github release](https://img.shields.io/github/release/nightnoryu/anon3anon.svg)](https://github.com/nightnoryu/anon3anon/releases) [![Build Status](https://github.com/nightnoryu/anon3anon/actions/workflows/check-go.yml/badge.svg)](https://github.com/nightnoryu/anon3anon/actions/workflows/check-go.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/nightnoryu/anon3anon)](https://goreportcard.com/report/github.com/nightnoryu/anon3anon) Telegram bot for anonymous messages. Currently running at https://t.me/meme_me_a_meme_bot for my channel. -## Local developemnt +## Local development Prerequisites: