Skip to content

Bump prefix-dev/setup-pixi from 0.4.1 to 0.4.3 #140

Bump prefix-dev/setup-pixi from 0.4.1 to 0.4.3

Bump prefix-dev/setup-pixi from 0.4.1 to 0.4.3 #140

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
outputs:
version-changed: ${{ steps.version-metadata.outputs.changed }}
new-version: ${{ steps.version-metadata.outputs.newVersion }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Python build
run: pip install build
- name: Build project
run: python -m build
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: artifact
path: dist/*
- uses: Quantco/ui-actions/version-metadata@v1
id: version-metadata
with:
file: ./pyproject.toml
token: ${{ secrets.GITHUB_TOKEN }}
version-extraction-override: 'regex:version = "(.*)"'
release:
name: Publish package
if: github.event_name == 'push' && github.ref_name == 'main' && needs.build.outputs.version-changed == 'true'
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
environment: pypi
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish package on TestPyPi
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish package on PyPi
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
- uses: actions/checkout@v4
- name: Push v${{ needs.build.outputs.new-version }} tag
run: |
git tag v${{ needs.build.outputs.new-version }}
git push origin v${{ needs.build.outputs.new-version }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
tag_name: v${{ needs.build.outputs.new-version }}
draft: true