2024-09-12 16:06:59 -04:00
|
|
|
name: promote_to_release
|
2024-08-16 17:59:10 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2024-09-12 16:06:59 -04:00
|
|
|
releaseKind:
|
|
|
|
description: 'Kind of release'
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- rc
|
|
|
|
- lts
|
|
|
|
required: true
|
2024-08-16 17:59:10 -04:00
|
|
|
commitHash:
|
2024-09-12 16:06:59 -04:00
|
|
|
description: Commit to promote to release
|
2024-08-16 17:59:10 -04:00
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
2024-09-12 16:06:59 -04:00
|
|
|
promote-to-release:
|
|
|
|
name: Promote to Release
|
2024-08-18 16:45:54 -04:00
|
|
|
runs-on: macOS-latest
|
2024-08-16 17:59:10 -04:00
|
|
|
if: github.repository == 'denoland/deno'
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.DENOBOT_PAT }}
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- 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: Install deno
|
2024-10-22 11:24:27 -04:00
|
|
|
uses: denoland/setup-deno@v2
|
2024-08-16 17:59:10 -04:00
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
|
2024-08-18 16:45:54 -04:00
|
|
|
- name: Install rust-codesign
|
|
|
|
run: |-
|
|
|
|
./tools/install_prebuilt.js rcodesign
|
|
|
|
echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
|
|
|
|
|
2024-09-12 16:06:59 -04:00
|
|
|
- name: Promote to Release
|
2024-08-18 16:45:54 -04:00
|
|
|
env:
|
|
|
|
APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}'
|
|
|
|
APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}'
|
2024-08-16 17:59:10 -04:00
|
|
|
run: |
|
2024-09-12 16:06:59 -04:00
|
|
|
deno run -A ./tools/release/promote_to_release.ts ${{github.event.inputs.releaseKind}} ${{github.event.inputs.commitHash}}
|
2024-08-16 17:59:10 -04:00
|
|
|
|
|
|
|
- name: Upload archives to dl.deno.land
|
|
|
|
run: |
|
2024-09-19 07:48:06 -04:00
|
|
|
gsutil -h "Cache-Control: public, max-age=3600" cp ./*.zip gs://dl.deno.land/release/$(cat release-${{github.event.inputs.releaseKind}}-latest.txt)/
|
|
|
|
gsutil -h "Cache-Control: no-cache" cp release-${{github.event.inputs.releaseKind}}-latest.txt gs://dl.deno.land/release-${{github.event.inputs.releaseKind}}-latest.txt
|