Skip to content

Commit

Permalink
fix(release): Fix changelog generation (#105)
Browse files Browse the repository at this point in the history
Every kleat release was generating a full changelog of all commits
ever made rather than only those since the last release.

The reason for this is that we were not fetching tags when cloning
the repository, so when go-releaser used 'git describe' to find the
last tag, it was not finding one and thus generating a changelog of
all commits ever made.

This could be fixed by adding a --tags to the unshallow command,
but it looks like the github action will fetch tags if you pass
depth=0 to it (which means fetch all commits) so let's do that
instead. It looks like in the two weeks since we added this config,
go-releaser has updated their docs to now suggest adding depth=0
to the checkout command (whereas they previously had the unshallow
command that was broken).
  • Loading branch information
ezimanyi authored Jun 22, 2020
1 parent 2892472 commit d8ab240
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
if: startsWith(github.repository, 'spinnaker/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v1
with:
Expand Down

0 comments on commit d8ab240

Please sign in to comment.