diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ecd75cf..010f398 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,13 +4,7 @@ name: CICD # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch -on: - push: - branches: - - main - pull_request: - branches: - - '*' +on: [push, pull_request] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -27,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.17.9' # The Go version to download (if necessary) and use. + go-version: 1.17.x # Run build of the application - name: Run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75a7f75..1641369 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,12 @@ name: goreleaser on: push: - # run only against tags + branches-ignore: + - '**' tags: - - '*' + - 'v*.*.*' + # to be used by fork patch-releases ^^ + - 'v*.*.*-*' permissions: contents: write @@ -24,7 +27,7 @@ jobs: - name: "Set up Go" uses: actions/setup-go@v2 with: - go-version: 1.17.9 + go-version: 1.17.x - name: "Run GoReleaser" uses: goreleaser/goreleaser-action@v2 with: