Bump go.uber.org/zap from 1.24.0 to 1.25.0 #1547
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: Build | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: ["1.19", "1.20"] | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/checkout@v3 | |
- name: Get external dependencies (Ubuntu) | |
if: matrix.os == 'ubuntu-22.04' | |
run: sudo apt update && sudo apt -y install build-essential libvips-dev | |
- name: Get Go dependencies | |
run: | | |
go get -v -t -d ./... | |
- name: Build | |
run: go build -ldflags="-s -w" -v -o ../../build/chatterino-api | |
working-directory: cmd/api | |
- name: Test | |
run: go test -v -tags test ./... | |
- name: Migration test | |
run: go test -v -tags migrationtest ./... | |
- name: Generate code coverage | |
if: matrix.os == 'ubuntu-22.04' && matrix.go == '1.19' | |
run: go test -race -v -count=1 -coverprofile=coverage.out -tags test ./... | |
- name: Upload Test Coverage | |
if: matrix.os == 'ubuntu-22.04' && matrix.go == '1.19' | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: chatterino-api-${{ matrix.go }}-${{ matrix.os }} | |
path: build/chatterino-api | |
create-release: | |
needs: build | |
runs-on: ubuntu-22.04 | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: 'project-git-repo' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: chatterino-api-1.19-ubuntu-22.04 | |
path: bins/ubuntu/ | |
- name: display structure | |
run: ls -lR | |
- name: rename files | |
run: | | |
mkdir final-bins | |
mv bins/ubuntu/chatterino-api final-bins/chatterino-api-ubuntu-x86_64 | |
- name: build-changelog | |
run: sed "0,/## $(echo "$GITHUB_REF_VALUE" | cut -d '/' -f 3 | cut -c2-)/d" project-git-repo/CHANGELOG.md | sed '/^## /,+999999999999999999 d' | tail -n+2 | head -n-1 > release-body | |
env: | |
GITHUB_REF_VALUE: ${{ github.ref }} | |
- name: create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: release-body | |
files: | | |
final-bins/chatterino-api-ubuntu-x86_64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |