-
Notifications
You must be signed in to change notification settings - Fork 51
52 lines (46 loc) · 1.15 KB
/
release.yml
File metadata and controls
52 lines (46 loc) · 1.15 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
46
47
48
49
50
51
52
name: Release CD
on:
release:
types: [published]
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/**'
jobs:
pypi-publish:
name: Publish release to PyPI
environment:
name: pypi
url: https://pypi.org/project/ctlearn/
permissions:
id-token: write
contents: write
deployments: write
statuses: write
actions: write
checks: read
strategy:
matrix:
os: [ubuntu-22.04]
pyv: ['3.12']
max-parallel: 5
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up micromamba (Python ${{ matrix.pyv }})
uses: mamba-org/setup-micromamba@v1
with:
environment-name: ctlearn
create-args: >-
python=${{ matrix.pyv }}
pip
cache-environment: true
- name: Build package
shell: micromamba-shell {0}
run: |
python --version
pip install -U build
python -m build
- name: Publish package distributions to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1