Skip to content

Bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4 (#273) #951

Bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4 (#273)

Bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4 (#273) #951

name: Build and upload to PyPI
on:
push:
branches:
- "*"
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e
with:
environments: build
- name: Build project
run: pixi run -e build build-wheel
- name: Upload package
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: artifact
path: dist/*
# Calling the publish-action twice in the same job is not supported:
# https://github.com/pypa/gh-action-pypi-publish/issues/352
release-TestPyPi:
name: Publish package
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
environment: pypi
steps:
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: artifact
path: dist
- name: Publish package on TestPyPi
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
with:
repository-url: https://test.pypi.org/legacy/
release-PyPi:
name: Publish package
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
environment: pypi
steps:
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: artifact
path: dist
- name: Publish package on PyPi
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e