Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix moratorium check process for prereleases #3123

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading