Lightpanda: the headless browser designed for AI and automation
Generate a versions.json file
Pierre Tachoire4d07f47da1a3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex d177ca18e..1c177cd68 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -6,6 +6,7 @@ env:AWS_BUCKET: ${{ vars.NIGHTLY_BUILD_AWS_BUCKET }}AWS_REGION: ${{ vars.NIGHTLY_BUILD_AWS_REGION }}AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ vars.AWS_CF_DISTRIBUTION_NIGHTLY }}+ AWS_CLOUDFRONT_GET_ID: ${{ vars.AWS_CF_GET }}RELEASE: ${{ github.ref_type == 'tag' && github.ref_name || 'nightly' }}VERSION_FLAG: ${{ github.ref_type == 'tag' && format('-Dversion={0}', github.ref_name) || '-Dversion=nightly' }}@@ -142,6 +143,35 @@ jobs:needs: build-linuxuses: ./.github/workflows/package-debian.yml+ update-versions:+ needs: [build-linux, build-macos]+ runs-on: ubuntu-latest+ timeout-minutes: 10+ steps:+ - uses: actions/checkout@v6+ with:+ fetch-depth: 0++ - uses: actions/setup-go@v5+ with:+ go-version: stable++ - name: Download linux x86_64 binary (to read the version)+ uses: actions/download-artifact@v4+ with:+ name: lightpanda-x86_64-linux++ - name: "Generate and publish versions.json"+ run: |+ chmod +x lightpanda-x86_64-linux+ VERSION=$(./lightpanda-x86_64-linux version)+ aws s3 cp s3://lpd-nightly-build/get/versions.json current.json --content-type application/json+ docker run --rm -v "$PWD:/work" -w /work \+ ghcr.io/lightpanda-io/version-fmt:latest \+ -release "${RELEASE}" -version "${VERSION}" /work/current.json > new.json+ aws s3 cp new.json s3://lpd-nightly-build/get/versions.json --content-type application/json+ aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_GET_ID }} --paths "/versions.json"+invalidate-cloudfront:needs: [build-linux, build-macos]runs-on: ubuntu-22.04