From 3a119b2d4db73df78ca404ffd86f80f047d9f6d2 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 29 Nov 2023 16:07:26 +0100 Subject: [PATCH 1/2] Use fetch-tags over manual fetch step --- .github/workflows/release-snapshot.yml | 9 ++++----- .github/workflows/release.yml | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index c3398a2bd..cd18eaaa8 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -14,9 +14,8 @@ jobs: steps: - name: Checkout repository and submodules uses: actions/checkout@v4 - - - name: Unshallow - run: git fetch --prune --unshallow + with: + fetch-tags: true - name: Setup Go uses: actions/setup-go@v4 @@ -56,7 +55,7 @@ jobs: - name: Update snapshot tag # Snapshot release may only be updated for commits to the main branch. - # if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' run: | git tag snapshot @@ -65,7 +64,7 @@ jobs: - name: Update snapshot release # Snapshot release may only be updated for commits to the main branch. - # if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' uses: softprops/action-gh-release@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea9e4690c..c3893ee2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,9 +15,8 @@ jobs: steps: - name: Checkout repository and submodules uses: actions/checkout@v4 - - - name: Unshallow - run: git fetch --prune --unshallow + with: + fetch-tags: true - name: Setup Go uses: actions/setup-go@v4 From a64682b036e3dd23cb9032d3f9cb5e1573f51078 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 29 Nov 2023 16:11:58 +0100 Subject: [PATCH 2/2] Include fetch-depth=0 --- .github/workflows/release-snapshot.yml | 1 + .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index cd18eaaa8..51d3ad16b 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -15,6 +15,7 @@ jobs: - name: Checkout repository and submodules uses: actions/checkout@v4 with: + fetch-depth: 0 fetch-tags: true - name: Setup Go diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3893ee2d..519dcf43b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ jobs: - name: Checkout repository and submodules uses: actions/checkout@v4 with: + fetch-depth: 0 fetch-tags: true - name: Setup Go