Skip to content

Commit

Permalink
chore: fix moratorium check process for prereleases (#3123)
Browse files Browse the repository at this point in the history
* chore: remove moratorium check from create-cli-release.yml

* chore: add validate release job to start-gh-release

* Update .github/workflows/start-gh-release.yml

Co-authored-by: Eric <[email protected]>

---------

Co-authored-by: Eric <[email protected]>
  • Loading branch information
k80bowman and eablack authored Dec 4, 2024
1 parent 47409a2 commit 1c34b8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ on:
default: false

jobs:
check-for-moratorium:
if: ${{ fromJSON(inputs.isStableCandidate) }}
uses: ./.github/workflows/tps-check-lock.yml
secrets: inherit

get-version-channel:
needs: [check-for-moratorium]
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.getVersion.outputs.channel }}
Expand All @@ -38,7 +32,7 @@ jobs:
path: './packages/cli/package.json'

publish-npm:
needs: [get-version-channel, check-for-moratorium]
needs: [get-version-channel]
# if NOT isStableCandidate confirm dist tag is in package.json version
if: fromJSON(needs.get-version-channel.outputs.isStableRelease) || (!fromJSON(inputs.isStableCandidate) && !!needs.get-version-channel.outputs.channel)
uses: ./.github/workflows/publish-npm.yml
Expand All @@ -48,12 +42,12 @@ jobs:
secrets: inherit

pack-upload:
needs: [publish-npm, check-for-moratorium]
needs: [publish-npm]
uses: ./.github/workflows/pack-upload.yml
secrets: inherit

promote:
needs: [get-version-channel, pack-upload, check-for-moratorium]
needs: [get-version-channel, pack-upload]
if: needs.pack-upload.result == 'success'
uses: ./.github/workflows/promote-release.yml
with:
Expand All @@ -63,7 +57,7 @@ jobs:
secrets: inherit

publish-docs:
needs: [get-version-channel, promote, check-for-moratorium]
needs: [get-version-channel, promote]
uses: ./.github/workflows/devcenter-doc-update.yml
with:
isStableRelease: ${{ fromJSON(inputs.isStableCandidate) }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/start-gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ on:
- closed

jobs:
check-for-moratorium:
uses: ./.github/workflows/tps-check-lock.yml
secrets: inherit

get-source-branch-name:
needs: [check-for-moratorium]
# GHA does not provide short name for branch being merged in. This shortens it so we can validate it with startsWith()
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand All @@ -26,9 +21,14 @@ jobs:
id: sourceName
run: echo "sourceName=${GITHUB_HEAD_REF#refs/heads/}" >> $GITHUB_OUTPUT

start-release:
needs: [get-source-branch-name, check-for-moratorium]
validate-release:
needs: [get-source-branch-name]
if: startsWith(needs.get-source-branch-name.outputs.sourceName, 'release-')
uses: ./.github/workflows/tps-check-lock.yml
secrets: inherit

start-release:
needs: [validate-release]
uses: ./.github/workflows/tag-create-github-release.yml
secrets: inherit

0 comments on commit 1c34b8f

Please sign in to comment.