Skip to content

Commit

Permalink
ci(mrml-python): create github actions config for release
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémie Drouet <[email protected]>
  • Loading branch information
jdrouet committed Dec 6, 2023
1 parent 840e38d commit 5c2173c
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/mrml-python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file is autogenerated by maturin v1.4.0
# To update, run
#
# maturin generate-ci github --platform linux
#
name: mrml-python release

on:
push:
branches:
- main
tags:
- 'mrml-python-v*'
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *

0 comments on commit 5c2173c

Please sign in to comment.