Skip to content

Expand injection keyword coverage #20

Expand injection keyword coverage

Expand injection keyword coverage #20

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
tags: ['*']
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
PKG_DIR: ./mirseo_formatter
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
jobs:
linux-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: ${{ env.PKG_DIR }}
target: x86_64
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86_64
path: ${{ env.PKG_DIR }}/dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
working-directory: ${{ env.PKG_DIR }}
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: ${{ env.PKG_DIR }}/dist
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux-build, sdist]
permissions:
id-token: write
contents: write
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: 'wheels-*/*'
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
deploy:
name: Deploy to Release
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.event.head_commit.message, 'deploy')
needs: [linux-build, sdist]
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: release-${{ github.sha }}
name: "Release ${{ github.sha }}"
body: |
${{ github.event.head_commit.message }}
files: |
dist/wheels-linux-x86_64/*
dist/wheels-sdist/*