From 97f8ac76c465f143fad311866d9aec8d09108c85 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:15:37 +0100 Subject: [PATCH 1/7] add ci file --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ba71565 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Release +on: push +jobs: + release: + runs-on: ubuntu-18.04 + steps: + - name: Source checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Release + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + 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 + echo "Insert Go test & Build Here" ## Insert Go test & Build Here + npx semantic-release \ No newline at end of file From a91607b4e1673b61ae0c2dfd184689c9fde9f937 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:18:46 +0100 Subject: [PATCH 2/7] seperate test and release --- .github/workflows/release.yml | 5 ++++- .github/workflows/test.yml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba71565..04a374e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: Release -on: push +on: + push: + branches: + - master jobs: release: runs-on: ubuntu-18.04 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ab54a86 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test +on: + push: + branches: + - !master +jobs: + release: + runs-on: ubuntu-18.04 + steps: + - name: Source checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Release + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Insert Go test & Build Here" ## Insert Go test & Build Here + npx semantic-release \ No newline at end of file From 27a9c8fdcb3cb98187a953ed8dd7fe94eee258d7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:23:29 +0100 Subject: [PATCH 3/7] change to matrix build --- .github/workflows/test.yml | 30 +++++++++++++----------------- .gitignore | 2 ++ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab54a86..772ffab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,20 +1,16 @@ name: Test -on: - push: - branches: - - !master +on: push jobs: - release: - runs-on: ubuntu-18.04 + build: + runs-on: ubuntu-108.04 + strategy: + matrix: + go: ['1.11', '1.12', '1.13'] + name: Go ${{ matrix.go }} sample steps: - - name: Source checkout - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: Release - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "Insert Go test & Build Here" ## Insert Go test & Build Here - npx semantic-release \ No newline at end of file + - uses: actions/checkout@master + - name: Setup go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go }} + - run: echo "i am groot" \ 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 From 931956f95a6d2fa717e67abc7b3bd586c003ea96 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:25:09 +0100 Subject: [PATCH 4/7] add file to test CI --- .github/workflows/test.yml | 2 +- main.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 main.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 772ffab..679abd5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,4 +13,4 @@ jobs: uses: actions/setup-go@v1 with: go-version: ${{ matrix.go }} - - run: echo "i am groot" \ No newline at end of file + - run: go run main.go \ No newline at end of file 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 From 41cf7deb96cf99a8cccd02d908f592cab3725603 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:26:34 +0100 Subject: [PATCH 5/7] fix version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 679abd5..70c3322 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push jobs: build: - runs-on: ubuntu-108.04 + runs-on: ubuntu-18.04 strategy: matrix: go: ['1.11', '1.12', '1.13'] From 2449f3fc40f1fc43120b98546d3bce0fdd6766d1 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:31:34 +0100 Subject: [PATCH 6/7] add test build --- .github/workflows/release.yml | 16 +++++++++++++--- .github/workflows/test.yml | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04a374e..0d2192b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,19 @@ on: 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: @@ -13,10 +26,7 @@ jobs: fetch-depth: 1 - name: Release shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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 - echo "Insert Go test & Build Here" ## Insert Go test & Build Here npx semantic-release \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70c3322..f5e9c29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test +name: Test & Build on: push jobs: build: From fd677e9d4a5bae185ae3dc7ae0c93837d9308467 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:34:37 +0100 Subject: [PATCH 7/7] add badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) 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