From bf282e4eeb860f15be695a88e899f908faebae02 Mon Sep 17 00:00:00 2001 From: Danny Leung Date: Thu, 28 Apr 2022 15:18:34 -0700 Subject: [PATCH] PEX-63: move version generation into API update job --- .github/workflows/build-and-validate.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-validate.yml b/.github/workflows/build-and-validate.yml index aa9629e908..deba53f0df 100644 --- a/.github/workflows/build-and-validate.yml +++ b/.github/workflows/build-and-validate.yml @@ -560,7 +560,18 @@ jobs: run: | source venv/bin/activate python3 contentctl.py --path . generate --product API --output dist/api - + + - name: Generate content version and timestamp JSON + run : | + curl -o version-api.json https://api.github.com/repositories/162346001/releases/latest + VERSION_VAL=$(cat version-api.json | jq '.name') + VERSION_TS=$(cat version-api.json | jq '.published_at') + echo "{\"version\":{\"name\":$VERSION_VAL,\"published_at\":$VERSION_TS}}" > dist/api/version.json + ls -ahl dist/api/version.json + echo "contents of version.json:" + cat dist/api/version.json + + #Official, Verified Amazon-AWS Github Account Provided Action - uses: aws-actions/configure-aws-credentials@v1 with: