diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 830822f912e61a64068d6c961eb90ba3a226842e..c274cb4b02f427ee97f8dd422e18ff072c3452b1 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 }}