Skip to content

ci: add release workflow #22

ci: add release workflow

ci: add release workflow #22

Workflow file for this run

name: CI
# This workflow is run on pushes to main & every Pull Requests except changes to tools/interop-node.
on:
pull_request:
push:
branches:
- main
- release/**
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-build
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- name: Lint
uses: golangci/[email protected]
with:
version: latest
# skip cache because of flaky behaviors
skip-build-cache: true
skip-pkg-cache: true
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- name: Test
run: make test
build:
runs-on: ubuntu-latest
needs: [lint, test]
if: ${{ always() && (needs.lint.result == 'success' || needs.test.result == 'success') }}
strategy:
matrix:
go-arch: ["amd64"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
.github/workflows/build.yml
- name: Download Go Dependency
if: env.GIT_DIFF
run : go mod download
- name: Build
if: env.GIT_DIFF
run: GOOS=linux GOARCH=${{ matrix.go-arch }} make build