From f81ad0b7c2ba85eeb99535189a6617af6488ff88 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 13 Nov 2022 10:35:03 -0500 Subject: [PATCH] fix: update latest release version after github release publish (#16603) --- .github/workflows/ci.yml | 4 ---- .github/workflows/post_publish.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/post_publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94669bafda..34b6e6289c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -549,8 +549,6 @@ jobs: startsWith(github.ref, 'refs/tags/') run: | 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 - 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) if: | @@ -564,8 +562,6 @@ jobs: shell: bash run: | 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 - gsutil -h "Cache-Control: no-cache" cp release-latest.txt gs://dl.deno.land/release-latest.txt - name: Create release notes shell: bash diff --git a/.github/workflows/post_publish.yml b/.github/workflows/post_publish.yml new file mode 100644 index 0000000000..074d997505 --- /dev/null +++ b/.github/workflows/post_publish.yml @@ -0,0 +1,21 @@ +name: post_publish + +on: published + +jobs: + update-dl-version: + name: update dl.deno.land version + runs-on: ubuntu-20.04 + if: github.repository == 'denoland/deno' + steps: + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: denoland + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Upload version file to dl.deno.land + run: | + echo ${GITHUB_REF#refs/*/} > release-latest.txt + gsutil -h "Cache-Control: no-cache" cp release-latest.txt gs://dl.deno.land/release-latest.txt