Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
a-kataev committed Apr 28, 2023
1 parent f981231 commit 4116dfc
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 29 deletions.
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- directory: .
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: go-test

on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_call:

jobs:
go:
go-test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- run: go test -v ./...
- run: go test -race -v ./...
13 changes: 4 additions & 9 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: golangci-lint

on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_call:

jobs:
golangci:
name: lint
golangci-lint:
name: run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: golangci/golangci-lint-action@v3
9 changes: 5 additions & 4 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: goreleaser

permissions:
contents: write

on:
push:
tags:
- 'v*.*.*'
workflow_call:

jobs:
goreleaser:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: goreleaser/goreleaser-action@v1
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: release

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

jobs:
go-test:
uses: ./.github/workflows/go-test.yml
golangci-lint:
uses: ./.github/workflows/golangci-lint.yml
goreleaser:
needs:
- go-test
- golangci-lint
uses: ./.github/workflows/goreleaser.yml
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test

on:
push:
branches:
- main
pull_request:

jobs:
go-test:
uses: ./.github/workflows/go-test.yml
golangci-lint:
uses: ./.github/workflows/golangci-lint.yml
5 changes: 2 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ project_name: tg
builds:
- id: tg
main: ./cmd/tg
ldflags:
- -s -w
binary: tg
goos:
- darwin
Expand All @@ -18,13 +20,10 @@ archives:
- tg
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}'
format: tar.gz
wrap_in_directory: false
files:
- xyz*
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_checksums.txt'
algorithm: sha256
changelog:
use: github-native
source:
enabled: false
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

[![Go Report Card](https://goreportcard.com/badge/github.com/a-kataev/tg)](https://goreportcard.com/report/github.com/a-kataev/tg)
[![Go Reference](https://pkg.go.dev/badge/github.com/a-kataev/tg.svg)](https://pkg.go.dev/github.com/a-kataev/tg)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/a-kataev/tg)

Another 😩 simple library for sending *text* messages via telegram bot
Another 😩 simple library (and cli 😉) for sending *text* messages via telegram bot

0 comments on commit 4116dfc

Please sign in to comment.