Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/build-json.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: build-json

permissions:
packages: read

on:
workflow_dispatch:
inputs:
Expand All @@ -18,7 +21,7 @@ on:
required: true
default: 'main'
data-repo:
description: Data (staging) repo to use
description: 'Data (staging) repo to use (if "GENERATE", generate production data)'
required: true
default: 'unicode-org/cldr-staging'
data-ref:
Expand Down Expand Up @@ -61,12 +64,27 @@ jobs:
${{ runner.os }}-maven-
- name: Clone Data
uses: actions/checkout@v5
if: ${{ github.event.inputs.data-repo != 'generate' }}
# 'GENERATE' will generate here, in the action.
# 'generate' will generate in the build script, currently broken.
if: ${{ github.event.inputs.data-repo != 'GENERATE' && github.event.inputs.data-repo != 'generate' }}
with:
ref: ${{ github.event.inputs.data-ref }}
repository: ${{ github.event.inputs.data-repo }}
sparse-checkout: ${{ github.event.inputs.data-dir }}
path: cldr-staging
- name: Generate Production
if: github.event.inputs.data-repo == 'GENERATE'
run: |
cd cldr
mkdir -p ../cldr-staging/${{ github.event.inputs.data-dir }}
echo "::group::Build cldr-code"
mvn -s ../cldr/.github/workflows/mvn-settings.xml -B compile install package -DskipTests=true --file=tools/pom.xml -pl cldr-code
echo "::endgroup::"
echo "::group::GenerateProductionData"
mvn -s ../cldr/.github/workflows/mvn-settings.xml -B -DCLDR_DIR=$(pwd) -DCLDR_GITHUB_ANNOTATIONS=true --file=tools/pom.xml -pl cldr-code exec:java -Dexec.mainClass=org.unicode.cldr.tool.GenerateProductionData
echo "::endgroup::"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Config
run: |
cd cldr-json
Expand All @@ -86,7 +104,7 @@ jobs:
rm -rf cldr-json
echo "::endgroup::"
echo "::group::Build"
env MVN_OPTS="-s ../cldr/.github/workflows/mvn-settings.xml" bash ./cldr-generate-json.sh
env MVN_OPTS="-B -s ../cldr/.github/workflows/mvn-settings.xml" bash ./cldr-generate-json.sh
echo "::endgroup::"
echo "::group::Status"
git status || true
Expand Down
Loading