Skip to content

fix script

fix script #385

Workflow file for this run

name: Publish PyPI
on: push
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: [skala, microsoft-skala, skala-cuda12x, skala-cuda13x]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Print CPU diagnostics
uses: ./.github/actions/cpu-diagnostics
- name: Setup Pixi
uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1
with:
pixi-version: v0.75.0
environments: release
activate-environment: true
locked: true
cache: false
- name: Build a binary wheel and a source tarball
run: python tools/build_release.py ${{ matrix.package }}
- name: Store the distribution packages
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ matrix.package }}-pkg
path: dist/
build-conda:
name: Build unpublished conda artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Print CPU diagnostics
uses: ./.github/actions/cpu-diagnostics
- name: Setup Pixi
uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1
with:
pixi-version: v0.75.0
environments: release
activate-environment: true
locked: true
cache: false
- name: Build conda artifact
run: pixi publish --path skala --target-dir dist-conda
- name: Store conda artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: skala-conda-pkg
path: dist-conda/*.conda
if-no-files-found: error
publish-to-pypi:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: [skala, microsoft-skala, skala-cuda12x, skala-cuda13x]
environment:
name: pypi
url: https://pypi.org/p/${{ matrix.package }}
permissions:
contents: read
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Print CPU diagnostics
uses: ./.github/actions/cpu-diagnostics
- name: Download all the dists
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: ${{ matrix.package }}-pkg
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1