1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

build: set cache-control for dl.deno.land (#12708)

Sometimes you have to wait up to an hour before you can upgrade to the
latest canary build, because the file that stores the hash of the latest
commit is cached for up to an hour.
This commit is contained in:
Luca Casonato 2021-11-09 20:52:07 +01:00 committed by GitHub
parent 9817c24642
commit a632dc5b0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -405,7 +405,7 @@ jobs:
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
github.ref == 'refs/heads/main' github.ref == 'refs/heads/main'
run: | run: |
gsutil cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/ gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
- name: Upload canary to dl.deno.land (windows) - name: Upload canary to dl.deno.land (windows)
if: | if: |
@ -418,7 +418,7 @@ jobs:
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
shell: bash shell: bash
run: | run: |
gsutil cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/ gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
- name: Test debug - name: Test debug
if: | if: |
@ -508,10 +508,10 @@ jobs:
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
run: | run: |
gzip ./wptreport.json gzip ./wptreport.json
gsutil cp ./wpt.json gs://dl.deno.land/wpt/$(git rev-parse HEAD).json gsutil -h "Cache-Control: public, max-age=3600" cp ./wpt.json gs://dl.deno.land/wpt/$(git rev-parse HEAD).json
gsutil cp ./wptreport.json.gz gs://dl.deno.land/wpt/$(git rev-parse HEAD)-wptreport.json.gz gsutil -h "Cache-Control: public, max-age=3600" cp ./wptreport.json.gz gs://dl.deno.land/wpt/$(git rev-parse HEAD)-wptreport.json.gz
echo $(git rev-parse HEAD) > wpt-latest.txt echo $(git rev-parse HEAD) > wpt-latest.txt
gsutil cp wpt-latest.txt gs://dl.deno.land/wpt-latest.txt gsutil -h "Cache-Control: no-cache" cp wpt-latest.txt gs://dl.deno.land/wpt-latest.txt
- name: Upload wpt results to wpt.fyi - name: Upload wpt results to wpt.fyi
if: | if: |
@ -581,9 +581,9 @@ jobs:
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
startsWith(github.ref, 'refs/tags/') startsWith(github.ref, 'refs/tags/')
run: | run: |
gsutil cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
echo ${GITHUB_REF#refs/*/} > release-latest.txt echo ${GITHUB_REF#refs/*/} > release-latest.txt
gsutil cp release-latest.txt gs://dl.deno.land/release-latest.txt gsutil -h "Cache-Control: no-cache" cp release-latest.txt gs://dl.deno.land/release-latest.txt
- name: Upload release to dl.deno.land (windows) - name: Upload release to dl.deno.land (windows)
if: | if: |
@ -596,9 +596,9 @@ jobs:
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
shell: bash shell: bash
run: | run: |
gsutil cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
echo ${GITHUB_REF#refs/*/} > release-latest.txt echo ${GITHUB_REF#refs/*/} > release-latest.txt
gsutil cp release-latest.txt gs://dl.deno.land/release-latest.txt gsutil -h "Cache-Control: no-cache" cp release-latest.txt gs://dl.deno.land/release-latest.txt
- name: Upload release to GitHub - name: Upload release to GitHub
uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22 uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22
@ -635,4 +635,4 @@ jobs:
- name: Upload canary version file to dl.deno.land - name: Upload canary version file to dl.deno.land
run: | run: |
echo ${{ github.sha }} > canary-latest.txt echo ${{ github.sha }} > canary-latest.txt
gsutil cp canary-latest.txt gs://dl.deno.land/canary-latest.txt gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt