Skip to content

Commit

Permalink
ci: make release depend on tag and check out again to fetch new tags (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenning authored Jun 4, 2021
1 parent 3424f52 commit aa433e4
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,25 @@ on:
types: [completed]

jobs:
changes:
tag:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

outputs:
gosrc: ${{ steps.filter.outputs.gosrc }}

steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: filter-src
id: filter
uses: dorny/paths-filter@v2
- name: tag
uses: mathieudutour/github-tag-action@v5.5
with:
filters: |
gosrc:
- '**/*.go'
- 'go.mod'
- 'go.sum'
default_bump: false
github_token: ${{ secrets.GITHUB_TOKEN }}

release:
needs: changes
needs: tag

if: ${{ needs.changes.outputs.gosrc == 'true' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -48,11 +40,6 @@ jobs:
with:
go-version: 1.16.x

- name: tag
uses: mathieudutour/github-tag-action@v5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: goreleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down

0 comments on commit aa433e4

Please sign in to comment.