mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-31 09:46:05 -04:00
Generate a versions.json file
This commit is contained in:
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -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-linux
|
||||
uses: ./.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
|
||||
|
||||
Reference in New Issue
Block a user