Enforce adding a message to extension CLI bumps (#58786)
This slightly reworks the extension CLI bump workflow - instead of triggering on label push, it now triggers on workflow dispatch with a message enforced to be added there. This primarily allows us to add a message to these bumps to better communicate what changes with that version of the CLI. Furthermore, we can soon restrict the label to be only created by that workflow, which has the advantage that it can only be based off of main. Also, it has the nice side-effect that we actually only ever update the label if everything worked properly. Release Notes: - N/A
This commit is contained in:
1 parent
620ceaaaca
commit
511d197477
3 files changed
+142
-35
No files matched your search
@@ -5,12 +5,15 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: '0'
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- extension-cli
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
message:
|
||||
description: Describe why the extension CLI is being bumped and/or what changes are included.
|
||||
required: true
|
||||
type: string
|
||||
jobs:
|
||||
publish_job:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && github.ref == 'refs/heads/main'
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
steps:
|
||||
- name: steps::checkout_repo
|
||||
@@ -31,10 +34,29 @@ jobs:
|
||||
env:
|
||||
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
||||
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
||||
- id: generate-token
|
||||
name: steps::authenticate_as_zippy
|
||||
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
|
||||
with:
|
||||
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
|
||||
private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
- name: steps::update_tag
|
||||
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
|
||||
with:
|
||||
script: |
|
||||
github.rest.git.updateRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: 'tags/extension-cli',
|
||||
sha: context.sha,
|
||||
force: true
|
||||
})
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
update_sha_in_zed:
|
||||
needs:
|
||||
- publish_job
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && github.ref == 'refs/heads/main'
|
||||
runs-on: namespace-profile-8x16-ubuntu-2204
|
||||
steps:
|
||||
- id: generate-token
|
||||
@@ -69,6 +91,8 @@ jobs:
|
||||
body: |
|
||||
This PR bumps the extension CLI version used in the extension workflows to `${{ github.sha }}`.
|
||||
|
||||
${{ inputs.message }}
|
||||
|
||||
Release Notes:
|
||||
|
||||
- N/A
|
||||
@@ -84,7 +108,7 @@ jobs:
|
||||
update_sha_in_extensions:
|
||||
needs:
|
||||
- publish_job
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && github.ref == 'refs/heads/main'
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
steps:
|
||||
- id: generate-token
|
||||
@@ -114,6 +138,8 @@ jobs:
|
||||
title: Bump extension CLI version to `${{ steps.short-sha.outputs.sha_short }}`
|
||||
body: |
|
||||
This PR bumps the extension CLI version to https://github.com/zed-industries/zed/commit/${{ github.sha }}.
|
||||
|
||||
${{ inputs.message }}
|
||||
commit-message: Bump extension CLI version to `${{ steps.short-sha.outputs.sha_short }}`
|
||||
branch: update-extension-cli-sha
|
||||
committer: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
|
||||
|
||||
Reference in new issue
Block a user