Skip to content

Commit

Permalink
release automation (#7)
Browse files Browse the repository at this point in the history
* release automation

* typo

* cancelation of builds
  • Loading branch information
hobu authored Apr 17, 2024
1 parent 9be8fb1 commit 1cbf338
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Release

on:
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
pypi-publish:
name: Upload release to PyPI
Expand All @@ -14,15 +20,20 @@ jobs:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Setup micromamba
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.x'
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
auto-update-conda: true
environment-file: .github/environment.yml

- name: Install dependencies
run: |
python -m pip install build
pip install build twine
python -m build . --sdist
python -m pip install build pipx twine
pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON
- name: Publish package distributions to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 1cbf338

Please sign in to comment.