diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0d2192b --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f5e9c29 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index f1c181e..217eeb7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out + +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index cefa308..1498fd6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # oidc + +![Release Badge](https://github.com/caos/oidc/workflows/Release/badge.svg) + OpenID Connect SDK (client and server) for Go diff --git a/main.go b/main.go new file mode 100644 index 0000000..4734979 --- /dev/null +++ b/main.go @@ -0,0 +1,5 @@ +package main +import "fmt" +func main() { + fmt.Println("hello world") +} \ No newline at end of file