From e2875aee74d8f41db9028cbfae0952bc9bf250e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 12 Sep 2024 21:06:59 +0100 Subject: ci: Add action to cut LTS release (#25590) Factored from https://github.com/denoland/deno/pull/25123. --------- Signed-off-by: David Sherret Co-authored-by: David Sherret Co-authored-by: David Sherret --- .github/workflows/promote_to_rc.yml | 55 ---------------------------- .github/workflows/promote_to_release.yml | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/promote_to_rc.yml create mode 100644 .github/workflows/promote_to_release.yml (limited to '.github/workflows') diff --git a/.github/workflows/promote_to_rc.yml b/.github/workflows/promote_to_rc.yml deleted file mode 100644 index a87574346..000000000 --- a/.github/workflows/promote_to_rc.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: promote_to_rc - -on: - workflow_dispatch: - inputs: - commitHash: - description: Commit to promote to the Release Candidate - required: true - -jobs: - promote-to-rc: - name: Promote to Release Candidate - runs-on: macOS-latest - 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 - uses: denoland/setup-deno@v1 - with: - deno-version: v1.x - - - name: Install rust-codesign - run: |- - ./tools/install_prebuilt.js rcodesign - echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH - - - name: Promote to RC - env: - APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}' - APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}' - run: | - deno run -A ./tools/release/promote_to_rc.ts ${{github.event.inputs.commitHash}} - - - name: Upload archives to dl.deno.land - run: | - gsutil -h "Cache-Control: public, max-age=3600" cp ./*.zip gs://dl.deno.land/release/$(cat release-rc-latest.txt)/ - gsutil -h "Cache-Control: no-cache" cp release-rc-latest.txt gs://dl.deno.land/release-rc-latest.txt diff --git a/.github/workflows/promote_to_release.yml b/.github/workflows/promote_to_release.yml new file mode 100644 index 000000000..07109acb6 --- /dev/null +++ b/.github/workflows/promote_to_release.yml @@ -0,0 +1,62 @@ +name: promote_to_release + +on: + workflow_dispatch: + inputs: + releaseKind: + description: 'Kind of release' + type: choice + options: + - rc + - lts + required: true + commitHash: + description: Commit to promote to release + required: true + +jobs: + promote-to-release: + name: Promote to Release + runs-on: macOS-latest + 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 + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Install rust-codesign + run: |- + ./tools/install_prebuilt.js rcodesign + echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH + + - name: Promote to Release + env: + APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}' + APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}' + run: | + deno run -A ./tools/release/promote_to_release.ts ${{github.event.inputs.releaseKind}} ${{github.event.inputs.commitHash}} + + - name: Upload archives to dl.deno.land + run: | + gsutil -h "Cache-Control: public, max-age=3600" cp ./*.zip gs://dl.deno.land/release/$(cat release-${{github.event.inputs.commitHash}}-latest.txt)/ + gsutil -h "Cache-Control: no-cache" cp release-${{github.event.inputs.commitHash}}-latest.txt gs://dl.deno.land/release-${{github.event.inputs.commitHash}}-latest.txt -- cgit v1.2.3