Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pnpm clean
**Semi-auto:**

Follow https://github.com/Azure/autorest.python/blob/main/.github/skills/bump-and-release/SKILL.md to make a release PR.
After it merged, trigger [release pipeline](https://dev.azure.com/azure-sdk/internal/_build?definitionId=1668) to release new version.
After it merged, [release pipeline](https://dev.azure.com/azure-sdk/internal/_build?definitionId=1668) will be triggered automatically to release new version.

## Contributing

Expand Down
30 changes: 28 additions & 2 deletions eng/pipelines/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is a manual pipeline, don't trigger automatically
trigger: none
# Trigger only after PR merged into main
trigger:
- main
pr: none

extends:
Expand Down Expand Up @@ -28,6 +29,31 @@ extends:
inputs:
versionSpec: 3.10

- script: |
set -e

# Check @azure-tools/typespec-python
TYPESPEC_VERSION=$(node -p "require('./packages/typespec-python/package.json').version")
echo "Checking if @azure-tools/typespec-python@$TYPESPEC_VERSION is already published..."
if npm view @azure-tools/typespec-python@$TYPESPEC_VERSION version 2>/dev/null; then
echo "##vso[task.logissue type=error]@azure-tools/typespec-python@$TYPESPEC_VERSION is already published to npm"
exit 1
fi
echo "@azure-tools/typespec-python@$TYPESPEC_VERSION is not yet published"

# Check @autorest/python
AUTOREST_VERSION=$(node -p "require('./packages/autorest.python/package.json').version")
echo "Checking if @autorest/python@$AUTOREST_VERSION is already published..."
if npm view @autorest/python@$AUTOREST_VERSION version 2>/dev/null; then
echo "##vso[task.logissue type=error]@autorest/python@$AUTOREST_VERSION is already published to npm"
exit 1
fi
echo "@autorest/python@$AUTOREST_VERSION is not yet published"

echo "Version check passed. Proceeding with build and tests."
displayName: Check if versions are already published
workingDirectory: $(Build.SourcesDirectory)

- script: npm install -g pnpm@9.5.0
displayName: Install PNPM 9.5.0

Expand Down
Loading