Merge pull request #1 from caos/chore-add-ci

WIP:Add CI to OIDC SDK
This commit is contained in:
livio-a 2019-11-15 14:53:06 +01:00 committed by GitHub
commit 94a4ac9068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 0 deletions

32
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['1.11', '1.12', '1.13']
name: Go ${{ matrix.go }} sample
steps:
- uses: actions/checkout@master
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- run: go run main.go
release:
runs-on: ubuntu-18.04
steps:
- name: Source checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Release
shell: bash
run: |
export GIT_TAG="v$(npx semantic-release --dry-run --plugins=@semantic-release/commit-analyzer --analize-commits | grep "The next release version is" | sed -ne 's/.*The\ next\ release\ version\ is\ \([0-9]\+\.[0-9]\+\.[0-9]\+\)$/\1/p')"
[[ "$GIT_TAG" == "v" ]] && echo "Exiting, as no new version needs to be released" && exit 0
npx semantic-release

16
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Test & Build
on: push
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['1.11', '1.12', '1.13']
name: Go ${{ matrix.go }} sample
steps:
- uses: actions/checkout@master
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- run: go run main.go

2
.gitignore vendored
View file

@ -10,3 +10,5 @@
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out
.DS_Store

View file

@ -1,2 +1,5 @@
# oidc # oidc
![Release Badge](https://github.com/caos/oidc/workflows/Release/badge.svg)
OpenID Connect SDK (client and server) for Go OpenID Connect SDK (client and server) for Go

5
main.go Normal file
View file

@ -0,0 +1,5 @@
package main
import "fmt"
func main() {
fmt.Println("hello world")
}