Skip to content

Commit 9718869

Browse files
authored
Merge pull request #22 from tushushu/wip-release-action
Wip publish action
2 parents fba2fd0 + 417a668 commit 9718869

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

.github/workflows/publish.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "publish"
2+
3+
# Controls when the workflow will run
4+
on:
5+
release:
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
11+
jobs:
12+
macos:
13+
runs-on: macos-latest
14+
strategy:
15+
matrix:
16+
python-version: ['3.7', '3.8', '3.9', '3.10']
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install Rust toolchain
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: stable
26+
profile: minimal
27+
default: true
28+
- name: Install Python packages
29+
run: |
30+
pip install maturin
31+
- name: Publish ulist
32+
env:
33+
PYPI_PW: ${{ secrets.PYPI_PW }}
34+
run: |
35+
maturin publish -m ulist/Cargo.toml -u tushushu -p $PYPI_PW
36+
37+
38+
linux:
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
python-version: ['3.7', '3.8', '3.9', '3.10']
43+
steps:
44+
- uses: actions/checkout@v2
45+
- uses: actions/setup-python@v2
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- name: Install Rust toolchain
49+
uses: actions-rs/toolchain@v1
50+
with:
51+
toolchain: stable
52+
profile: minimal
53+
default: true
54+
- name: Install Python packages
55+
run: |
56+
pip install maturin
57+
- name: Publish ulist
58+
env:
59+
PYPI_PW: ${{ secrets.PYPI_PW }}
60+
run: |
61+
maturin publish -m ulist/Cargo.toml -u tushushu -p $PYPI_PW

.github/workflows/sphinx.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: "doc"
22
on:
3-
- pull_request
43
- release
54

65
jobs:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# ulist
22

33
[![PyPI](https://img.shields.io/pypi/v/ulist)](https://pypi.org/project/ulist/)
4+
![PyPI - Format](https://img.shields.io/pypi/format/ulist)
45
[![License](https://img.shields.io/github/license/tushushu/ulist)](https://github.com/tushushu/ulist/blob/main/LICENSE)
56
[![CI](https://github.com/tushushu/ulist/workflows/CI/badge.svg)](https://github.com/tushushu/ulist/actions/workflows/main.yml)
67
[![doc](https://github.com/tushushu/ulist/workflows/doc/badge.svg)](https://github.com/tushushu/ulist/actions/workflows/sphinx.yml)
7-
![PyPI - Format](https://img.shields.io/pypi/format/ulist)
8+
[![publish](https://github.com/tushushu/ulist/workflows/publish/badge.svg)](https://github.com/tushushu/ulist/actions/workflows/publish.yml)
89
[![Code Style](https://img.shields.io/badge/code%20style-flake8-blue)](https://github.com/PyCQA/flake8)
910

1011

0 commit comments

Comments
 (0)