47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 1.13.x
|
|
tags-ignore:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
go: ['1.18', '1.19', '1.20']
|
|
name: Go ${{ matrix.go }} test
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
- run: go test -race -v -coverprofile=profile.cov -coverpkg=github.com/zitadel/oidc/... ./pkg/...
|
|
- uses: codecov/codecov-action@v3.1.1
|
|
with:
|
|
file: ./profile.cov
|
|
name: codecov-go
|
|
release:
|
|
runs-on: ubuntu-20.04
|
|
needs: [test]
|
|
if: ${{ github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/1.13.x' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- name: Source checkout
|
|
uses: actions/checkout@v3
|
|
- name: Semantic Release
|
|
uses: cycjimmy/semantic-release-action@v3
|
|
with:
|
|
dry_run: false
|
|
semantic_version: 18.0.1
|
|
extra_plugins: |
|
|
@semantic-release/exec@6.0.3
|