summaryrefslogtreecommitdiff
path: root/.github/workflows/post_publish.yml
blob: c0db0906df414ff4c7fa17a004f6888f2b506b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: post_publish

on:
  release:
    types: [published]

jobs:
  update-dl-version:
    name: update dl.deno.land version
    runs-on: ubuntu-22.04
    if: github.repository == 'denoland/deno'
    steps:
      - name: Authenticate with Google Cloud
        uses: google-github-actions/auth@v1
        with:
          project_id: denoland
          credentials_json: ${{ secrets.GCP_SA_KEY }}
          export_environment_variables: true
          create_credentials_file: true

      - name: Setup gcloud
        uses: google-github-actions/setup-gcloud@v1
        with:
          project_id: denoland

      - 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