fix(Releaser): Fix Goreleaser #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "1.18" | |
- name: Run coverage | |
run: go test -cover -race -coverprofile=coverage.txt -covermode=atomic ./internal/... ./pkg/... -coverpkg=./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage.txt | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set output | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF##*/} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: flagshipio/code-analyzer:${{ steps.vars.outputs.tag }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} |