Skip to content

OpenVPN Plugin

OpenVPN Plugin #211

Workflow file for this run

name: CI
env:
CGO: 0
on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build & Test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- run: go build
- run: go test ./... -race -covermode=atomic -coverprofile=coverage.out
- uses: codecov/codecov-action@v3
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
publish:
name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- build
- lint
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}