Skip to content

Debug workflows

Debug workflows #29

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
env:
GH_TOKEN: ${{ github.token }}
permissions: write-all
jobs:
prepare:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Codegen - Vector
run: python vector_codegen.py
working-directory: codegen
- name: Copy outputs to src
run: copy "codegen\output\*" "src\gdmath"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: codegen_results
path: codegen/output/
retention-days: 1
- name: Create Release
run: gh release create "${{ github.ref_name }}" --verify-tag --notes "${{ github.ref_name }}" --draft
source_dists:
runs-on: windows-latest
needs: prepare
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Codegen Output
uses: actions/download-artifact@v3
with:
name: codegen_results
path: src/gdmath
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Build
run: python setup.py sdist --formats=gztar,zip
- name: Upload
shell: pwsh
run: |
foreach ($file in (Get-ChildItem dist/*)) {
gh release upload "${{ github.ref_name }}" "$($file.FullName)"
}
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
with:
name: dists
path: dist/
binary_dists:
runs-on: ${{ matrix.platform }}
needs: prepare
strategy:
fail-fast: true
matrix:
platform: [ "windows-latest", "ubuntu-latest", "macos-latest" ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Codegen Output
uses: actions/download-artifact@v3
with:
name: codegen_results
path: src/gdmath
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install cibuildwheel==2.15.0
- name: Cythonize
shell: pwsh
run: |
foreach ($file in (Get-ChildItem src/gdmath/*.pyx)) {
cython "$($file.FullName)"
}
- name: CIBuildWheel
run: |
mkdir dist
python -m cibuildwheel --output-dir dist
# - name: Upload
# shell: pwsh
# run: |
# foreach ($file in (Get-ChildItem dist/*)) {
# gh release upload "${{ github.ref_name }}" "$($file.FullName)"
# }
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
with:
name: dists
path: dist/
final_publish:
runs-on: ubuntu-latest
needs: [source_dists, binary_dists]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish
run: gh release edit ${{ github.ref_name }} --draft=false
pypi_publish:
runs-on: ubuntu-latest
needs: final_publish
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- run: mkdir dist
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: dists
path: dist
- name: Upload
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/