-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.09 KB
/
release.yml
File metadata and controls
45 lines (43 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch: {}
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: 1.90.0
command: build
args: -m zbl_py/Cargo.toml --release -o dist --find-interpreter
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
publish:
needs:
- windows
runs-on: ubuntu-latest
steps:
- name: Get artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
- name: Publish package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@cbd6d01d855e02aab0908c7709d5c0ddc88c617a
with:
password: ${{ secrets.PYPI_API_TOKEN }}