diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:55:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:55:48 +0000 |
commit | 8be448d3881909fb0ce4b033cad71aa7575de0aa (patch) | |
tree | da33caff06645347a08c3c9c56dd703e4acb5aa3 /azure-pipelines/template/publish_pypi.yml | |
parent | Initial commit. (diff) | |
download | lsprotocol-8be448d3881909fb0ce4b033cad71aa7575de0aa.tar.xz lsprotocol-8be448d3881909fb0ce4b033cad71aa7575de0aa.zip |
Adding upstream version 2023.0.0.upstream/2023.0.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'azure-pipelines/template/publish_pypi.yml')
-rw-r--r-- | azure-pipelines/template/publish_pypi.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/azure-pipelines/template/publish_pypi.yml b/azure-pipelines/template/publish_pypi.yml new file mode 100644 index 0000000..1f29e1b --- /dev/null +++ b/azure-pipelines/template/publish_pypi.yml @@ -0,0 +1,43 @@ +parameters: + - name: publishPyPI + displayName: 🚀 Publish To PyPI + type: string + +jobs: + - job: PublishPkg + displayName: Publish Packages + + pool: + vmImage: windows-latest + + steps: + - task: DownloadPipelineArtifact@2 + displayName: "Download Pipeline Artifact" + inputs: + artifactName: dist + targetPath: "$(Build.SourcesDirectory)/dist" + + - task: UsePythonVersion@0 + displayName: "Use Python 3.7" + inputs: + versionSpec: 3.7 + + - script: python -m pip install -U pip + displayName: Upgrade Pip + + - script: python -m pip install twine + displayName: Install Twine + + - ${{ if eq(parameters.publishPyPI, 'Test') }}: + - script: python -m twine upload -r testpypi dist/* + displayName: Publish to Test PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: $(test_pypi_token) + + - ${{ if eq(parameters.publishPyPI, 'Real') }}: + - script: python -m twine upload dist/* + displayName: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: $(real_pypi_token) |