-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (54 loc) · 1.61 KB
/
release.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
check_release:
name: Check if package can be released
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e check-release
if: github.event_name == 'release' && github.event.action == 'published'
build_wheels:
name: Wheels
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history required so setuptools_scm can determine version
- uses: actions/setup-python@v5
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/wheels.txt
- name: Build wheels
run: python -m build
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
upload_packages:
name: Deploy packages
needs: [build_wheels]
runs-on: ubuntu-22.04
environment:
name: release
url: https://pypi.org/p/scitacean/
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
- uses: pypa/[email protected]
with:
attestations: true
docs:
needs: upload_packages
uses: ./.github/workflows/docs.yml
with:
publish: ${{ github.event_name == 'release' && github.event.action == 'published' }}
secrets: inherit