|
| 1 | +name: release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 3.12.* |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: windows-latest |
| 11 | + steps: |
| 12 | + - name: Checkout repository |
| 13 | + uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + token: ${{ secrets.COATL_BOT_GH_TOKEN }} |
| 17 | + |
| 18 | + - name: Download Python 3.12 |
| 19 | + run: | |
| 20 | + curl -O "https://www.python.org/ftp/python/${{ github.ref_name }}/Python-${{ github.ref_name }}.tgz" |
| 21 | + tar -xzf "Python-${{ github.ref_name }}.tgz" |
| 22 | + shell: bash |
| 23 | + |
| 24 | + - uses: actions/setup-python@v5 |
| 25 | + with: |
| 26 | + python-version: '3.x' |
| 27 | + |
| 28 | + - name: Install dependencies |
| 29 | + run: | |
| 30 | + python -m pip install Sphinx |
| 31 | + shell: bash |
| 32 | + |
| 33 | + - name: Set SPHINXBUILD environment variable |
| 34 | + run: | |
| 35 | + $sphinxBuild = (Get-Command sphinx-build.exe).Source |
| 36 | + echo "SPHINXBUILD=$sphinxBuild" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 37 | + shell: powershell |
| 38 | + |
| 39 | + - name: Fetch external libraries and tools |
| 40 | + run: | |
| 41 | + .\PCbuild\get_externals.bat |
| 42 | + .\Tools\msi\get_externals.bat |
| 43 | + shell: powershell |
| 44 | + working-directory: Python-${{ github.ref_name }} |
| 45 | + |
| 46 | + - name: Building ... |
| 47 | + run: | |
| 48 | + .\Tools\msi\buildrelease.bat -x86 |
| 49 | + .\Tools\msi\buildrelease.bat -x64 |
| 50 | + working-directory: Python-${{ github.ref_name }} |
| 51 | + shell: powershell |
| 52 | + |
| 53 | + - name: Create GitHub release |
| 54 | + run: | |
| 55 | + gh release create "${{ github.ref_name }}" \ |
| 56 | + --title "${{ github.ref_name }}" \ |
| 57 | + --notes "Automated release for version ${{ github.ref_name }}" |
| 58 | + env: |
| 59 | + GITHUB_TOKEN: ${{ secrets.COATL_BOT_GH_TOKEN }} |
| 60 | + shell: bash |
| 61 | + |
| 62 | + - name: Upload artifacts to GitHub release |
| 63 | + run: | |
| 64 | + gh release upload "${{ github.ref_name }}" ` |
| 65 | + --clobber ` |
| 66 | + Python-${{ github.ref_name }}\PCbuild\win32\en-us\python-${{ github.ref_name }}.exe ` |
| 67 | + Python-${{ github.ref_name }}\PCbuild\win32\en-us\python-${{ github.ref_name }}-embed-win32.zip ` |
| 68 | + Python-${{ github.ref_name }}\PCbuild\win32\en-us\pythonx86.${{ github.ref_name }}.nupkg ` |
| 69 | + Python-${{ github.ref_name }}\PCbuild\amd64\en-us\python.${{ github.ref_name }}.nupkg ` |
| 70 | + Python-${{ github.ref_name }}\PCbuild\amd64\en-us\python-${{ github.ref_name }}-amd64.exe ` |
| 71 | + Python-${{ github.ref_name }}\PCbuild\amd64\en-us\python-${{ github.ref_name }}-embed-amd64.zip |
| 72 | + env: |
| 73 | + GITHUB_TOKEN: ${{ secrets.COATL_BOT_GH_TOKEN }} |
| 74 | + shell: powershell |
0 commit comments