mirror of
https://github.com/Fishwaldo/go-logadapter.git
synced 2025-03-15 19:31:25 +00:00
chore: Update Github Actions again for Releaser (#8)
* Update build.yml
This commit is contained in:
parent
20aba9f372
commit
73ce6c5416
1 changed files with 24 additions and 28 deletions
52
.github/workflows/build.yml
vendored
52
.github/workflows/build.yml
vendored
|
@ -26,9 +26,28 @@ jobs:
|
|||
- name: Run tests
|
||||
run: go test -v -race ./...
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: go
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
codecov:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [ test, analyze ]
|
||||
steps:
|
||||
- name: Install Go
|
||||
if: success()
|
||||
|
@ -45,7 +64,7 @@ jobs:
|
|||
lint:
|
||||
name: Lint project using GolangCI Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [ test, analyze ]
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v1
|
||||
|
@ -56,33 +75,9 @@ jobs:
|
|||
only-new-issues: true
|
||||
args: --issues-exit-code=0
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
goreadme:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [codecov, lint, analyze]
|
||||
needs: [codecov, lint]
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
@ -95,9 +90,10 @@ jobs:
|
|||
title: 'Go-LogAdapter'
|
||||
# Optional: Token allows goreadme to comment the PR with diff preview.
|
||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
release:
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
if: github.event.pull_request.merged == true
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
needs: [goreadme]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
Loading…
Add table
Reference in a new issue