From ca8d66d574fe76714fd90ce8ae2a02e24378ac2f Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 3 Apr 2024 12:21:31 -0500 Subject: [PATCH] CLDR-16393 unbreak maven tag - cache .git and checkout cldr-archive when tagging for maven --- .github/workflows/maven-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index c5eb7fd1d26..7bc61d7161e 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -7,9 +7,20 @@ jobs: mvn-deploy: runs-on: ubuntu-latest steps: + # since we have to checkout all branches, cache here + - name: Cache .git + uses: actions/cache@v3 + with: + path: .git + key: git-${{ github.base_ref }}-${{ github.sha }} + restore-keys: | + git-${{ github.base_ref }}-${{ github.sha }} + git-${{ github.base_ref }} + git- - uses: actions/checkout@v4 with: lfs: false + fetch-depth: 0 # for cldr-archive - name: Set up JDK uses: actions/setup-java@v4 with: @@ -28,6 +39,9 @@ jobs: -DskipTests=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout CLDR archive + run: > + mkdir -v ../cldr-archive && java -jar tools/cldr-code/target/cldr-code.jar checkout-archive - name: set version to generic number run: | mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml versions:set -DnewVersion=0.0.0-SNAPSHOT-$(echo ${GITHUB_SHA} | cut -c1-10)