Cleanup GitHub actions
This commit is contained in:
parent
dd86250335
commit
c358848ed5
4 changed files with 31 additions and 50 deletions
27
.github/workflows/go.yml
vendored
27
.github/workflows/go.yml
vendored
|
@ -8,28 +8,49 @@ on:
|
|||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
packages: write
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.17
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '^1.17'
|
||||
id: go
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
lfs: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
|
||||
- name: Download assets
|
||||
run: task download-assets
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Build & test
|
||||
run: task download-assets test
|
||||
run: task test
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
|
|
46
.github/workflows/golangci-lint.yml
vendored
46
.github/workflows/golangci-lint.yml
vendored
|
@ -1,46 +0,0 @@
|
|||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.17
|
||||
uses: actions/setup-go@v2
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
- name: Download assets
|
||||
run: task download-assets
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: latest
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: somedir
|
||||
|
||||
# Optional: golangci-lint command line arguments.
|
||||
# args: --issues-exit-code=0
|
||||
|
||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||
# only-new-issues: true
|
||||
|
||||
# Optional: if set to true then the action will use pre-installed Go.
|
||||
# skip-go-installation: true
|
||||
|
||||
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
|
||||
# skip-pkg-cache: true
|
||||
|
||||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
|
||||
# skip-build-cache: true
|
|
@ -21,6 +21,12 @@ builds:
|
|||
goarch: arm
|
||||
goarm: '7'
|
||||
|
||||
release:
|
||||
github:
|
||||
owner: baez90
|
||||
name: goveal
|
||||
mode: replace
|
||||
|
||||
dockers:
|
||||
- id: goveal
|
||||
goos: linux
|
||||
|
|
|
@ -40,7 +40,7 @@ tasks:
|
|||
- go.sum
|
||||
cmds:
|
||||
- go mod download
|
||||
- go mod tidy
|
||||
- go mod tidy -compat=1.17
|
||||
|
||||
test:
|
||||
sources:
|
||||
|
|
Loading…
Reference in a new issue