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
83 changes: 6 additions & 77 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python wheels
name: Python release artifacts

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
Expand All @@ -21,14 +21,9 @@ on:
workflow_dispatch:
inputs:
release_version:
description: Version to build; required as confirmation when publishing to PyPI
description: Version to build
required: false
type: string
publish_pypi:
description: Publish through the protected pypi environment (tag refs only)
required: true
default: false
type: boolean

permissions:
contents: read
Expand All @@ -53,7 +48,6 @@ jobs:
shell: pwsh
env:
RELEASE_VERSION: ${{ inputs.release_version }}
PUBLISH_PYPI: ${{ inputs.publish_pypi }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
run: |
Expand Down Expand Up @@ -85,13 +79,6 @@ jobs:
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host "Effective Python version: $pythonVersion"

if ($env:PUBLISH_PYPI -eq 'true' -and
($env:REF_TYPE -ne 'tag' -or $env:REF_NAME -notlike 'v*')) {
throw 'PyPI publication requires dispatching an existing v<version> tag'
}
if ($env:PUBLISH_PYPI -eq 'true' -and -not $env:RELEASE_VERSION) {
throw 'PyPI publication requires an explicit release_version confirmation'
}
"version=$version" >> $env:GITHUB_OUTPUT
"python_version=$pythonVersion" >> $env:GITHUB_OUTPUT

Expand Down Expand Up @@ -148,7 +135,7 @@ jobs:
runtime-arm64:
if: github.event_name != 'pull_request'
needs: validate
runs-on: [self-hosted, Windows, ARM64, winui]
runs-on: windows-11-vs2026-arm
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -239,7 +226,7 @@ jobs:
codegen-arm64:
if: github.event_name != 'pull_request'
needs: validate
runs-on: [self-hosted, Windows, ARM64, winui]
runs-on: windows-11-vs2026-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -306,7 +293,7 @@ jobs:
consume-codegen-arm64:
if: github.event_name != 'pull_request'
needs: [validate, codegen-arm64]
runs-on: [self-hosted, Windows, ARM64, winui]
runs-on: windows-11-vs2026-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -363,7 +350,7 @@ jobs:
consume-runtime-arm64:
if: github.event_name != 'pull_request'
needs: [validate, runtime-arm64, codegen-arm64]
runs-on: [self-hosted, Windows, ARM64, winui]
runs-on: windows-11-vs2026-arm
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -472,61 +459,3 @@ jobs:
$arguments += $wheels
& gh @arguments
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

publish-runtime:
if: >-
github.event_name == 'workflow_dispatch' &&
inputs.publish_pypi &&
github.ref_type == 'tag' &&
startsWith(github.ref_name, 'v')
needs: [validate, assemble-release]
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-release-${{ needs.validate.outputs.version }}
path: dist
- name: Stage runtime wheels only
shell: bash
run: |
mkdir -p publish/runtime
find dist -type f -name 'dynwinrt-*.whl' -exec cp '{}' publish/runtime/ \;
test "$(find publish/runtime -type f -name '*.whl' | wc -l)" -eq 8
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: publish/runtime
attestations: true
skip-existing: true

publish-codegen:
if: >-
github.event_name == 'workflow_dispatch' &&
inputs.publish_pypi &&
github.ref_type == 'tag' &&
startsWith(github.ref_name, 'v')
needs: [validate, assemble-release, publish-runtime]
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-release-${{ needs.validate.outputs.version }}
path: dist
- name: Stage codegen wheels only
shell: bash
run: |
mkdir -p publish/codegen
find dist -type f -name 'dynwinrt_codegen-*.whl' -exec cp '{}' publish/codegen/ \;
test "$(find publish/codegen -type f -name '*.whl' | wc -l)" -eq 2
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: publish/codegen
attestations: true
skip-existing: true
1 change: 1 addition & 0 deletions .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ extends:
$root = Join-Path "$(Agent.TempDirectory)" "win32metadata"
nuget install Microsoft.Windows.SDK.Win32Metadata `
-Version 71.0.14-preview `
-Source https://packagefeedproxy.microsoft.io/nuget/v3/index.json `
-OutputDirectory $root `
-DirectDownload `
-NonInteractive
Expand Down
Loading
Loading