From 2a7238dc9cbe3898158f73a8f78c1fbbf1ba9b62 Mon Sep 17 00:00:00 2001
From: JonasS <jonass@dev.jsje.de>
Date: Tue, 4 May 2021 21:16:22 +0200
Subject: [PATCH] Attempt Github CI release

---
 .github/workflows/go.yml | 42 +++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 830822f..c274cb4 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -1,8 +1,8 @@
-name: Go
+name: Go-CI
 on:
   push:
-    branches: [ master ]
-    tags: ['*']
+    branches: [ '**' ]
+    tags: [ '**' ]
   pull_request:
     branches: [ master ]
 jobs:
@@ -16,23 +16,25 @@ jobs:
   build:
     runs-on: ubuntu-20.04
     steps:
-    - uses: actions/checkout@v2
-    - name: Set up Go
-      uses: actions/setup-go@v2
-      with:
-        go-version: 1.16
-    - name: Build
-      run: go build -v ./...
+      - uses: actions/checkout@v2
+      - name: Set up Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16
+      - name: Build
+        run: go build -v ./...
   release:
     runs-on: ubuntu-20.04
-#    needs: [lint, build]
-    if: startsWith(github.ref, 'refs/tags/')
+    needs: [ lint, build ]
+    if: |
+      ${{ startsWith(github.ref, 'refs/tags/') &&
+          contains(['mxschmitt', 'JonasProgrammer'], github.actor) }}
     steps:
-    - uses: actions/checkout@v2
-    - name: Run GoReleaser
-      uses: goreleaser/goreleaser-action@v2
-      with:
-        version: latest
-        args: release --rm-dist
-      env:
-        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+      - uses: actions/checkout@v2
+      - name: Run GoReleaser
+        uses: goreleaser/goreleaser-action@v2
+        with:
+          version: latest
+          args: release --rm-dist
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-- 
GitLab