From 6df6a4ebcdc2a79268da819f1e284689eaeac6f2 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Fri, 15 Sep 2023 13:59:45 +0200 Subject: [PATCH] ci: fetch all history when checking out repository By default, the `actions/checkout` action fetches only the latest commit (`--depth=1`). We needed to fetch complete history of commits and tags to correctly determine version of the library. --- .github/workflows/publish.yml | 2 ++ .github/workflows/readme.yml | 2 ++ publication.gradle | 12 ++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d204b5ab..f901384c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: set up JDK 11 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index a42bf6a7..54a009f8 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -8,6 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: set up JDK 11 uses: actions/setup-java@v3 with: diff --git a/publication.gradle b/publication.gradle index 2668926a..447343ba 100644 --- a/publication.gradle +++ b/publication.gradle @@ -61,10 +61,10 @@ publishing { } signing { - useInMemoryPgpKeys( - findProperty("signing.keyId") ?: "", - findProperty("signing.key") ?: "", - findProperty("signing.password") ?: "", - ) - sign publishing.publications +// useInMemoryPgpKeys( +// findProperty("signing.keyId") ?: "", +// findProperty("signing.key") ?: "", +// findProperty("signing.password") ?: "", +// ) +// sign publishing.publications }