Skip to content

Commit 93a7d24

Browse files
committed
chore: add publish flow
1 parent 9d7218e commit 93a7d24

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/publish.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags: [ '[0-9]+\.[0-9]+.*' ]
5+
6+
jobs:
7+
# build:
8+
# uses: ./.github/workflows/ci.yml
9+
publish:
10+
# needs: build
11+
runs-on: ubuntu-22.04
12+
environment:
13+
name: release
14+
url: https://pypi.org/p/ft-scikit-optimize
15+
permissions:
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v5
24+
25+
- name: Build distribution
26+
run: |
27+
pip install -U build
28+
python -m build --sdist --wheel
29+
30+
# - name: Download artifact
31+
# uses: actions/download-artifact@v3
32+
# with:
33+
# name: package
34+
# path: dist
35+
36+
- name: Publish 📦 on PyPI Test
37+
uses: pypa/[email protected]
38+
with:
39+
repository-url: https://test.pypi.org/legacy/
40+
41+
- name: Publish 📦 on PyPI
42+
uses: pypa/[email protected]
43+
44+
45+
docs:
46+
if: false
47+
needs: build
48+
runs-on: ubuntu-22.04
49+
strategy:
50+
matrix:
51+
python-version: [ 3.11 ]
52+
steps:
53+
- name: Download artifact
54+
uses: actions/download-artifact@v3
55+
with:
56+
name: docs
57+
58+
- name: Publish docs
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_DOCS_TOKEN }}
61+
run: |
62+
.github/scripts/publish_docs.sh doc/_build/html/stable

0 commit comments

Comments
 (0)