update workflows

This commit is contained in:
Medzik 2021-08-17 21:03:04 +00:00
parent e9f0631881
commit 560b5c5470
4 changed files with 40 additions and 9 deletions

View File

@ -1,8 +1,6 @@
name: Lint
on:
pull_request:
push:
on: [pull_request, push]
jobs:
golangci:
@ -10,10 +8,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: GolangCi Lint
uses: golangci/golangci-lint-action@v2
with:

View File

@ -1,7 +1,6 @@
name: Pull Request
on:
pull_request:
on: [pull_request]
jobs:
pull:
@ -13,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2

32
.github/workflows/push.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Push
on: [push]
jobs:
mod-tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Tidy
run: go mod tidy
- name: Commit
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "go mod tidy" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

View File

@ -14,12 +14,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: '0'
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Semantic Release
uses: go-semantic-release/action@v1