Skip to content

Commit 1cbf338

Browse files
authored
release automation (#7)
* release automation * typo * cancelation of builds
1 parent 9be8fb1 commit 1cbf338

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/release.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
name: Release
2+
13
on:
24
release:
35
types:
46
- published
57

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
10+
cancel-in-progress: true
11+
612
jobs:
713
pypi-publish:
814
name: Upload release to PyPI
@@ -14,15 +20,20 @@ jobs:
1420
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1521
steps:
1622
- uses: actions/checkout@v3
17-
- name: Set up Python
18-
uses: actions/setup-python@v4
23+
- name: Setup micromamba
24+
uses: conda-incubator/setup-miniconda@v3
1925
with:
20-
python-version: '3.x'
26+
miniforge-variant: Mambaforge
27+
miniforge-version: latest
28+
use-mamba: true
29+
python-version: ${{ matrix.python-version }}
30+
auto-update-conda: true
31+
environment-file: .github/environment.yml
32+
2133
- name: Install dependencies
2234
run: |
23-
python -m pip install build
24-
pip install build twine
25-
python -m build . --sdist
35+
python -m pip install build pipx twine
36+
pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON
2637
- name: Publish package distributions to PyPI
2738
if: github.event_name == 'release' && github.event.action == 'published'
2839
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)