-
Notifications
You must be signed in to change notification settings - Fork 36
47 lines (39 loc) · 1.23 KB
/
publish-jupyter-matlab-proxy.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
# Copyright 2020-2024 The MathWorks, Inc.
name: Publish jupyter-matlab-proxy to PyPI
on:
release:
types: [created]
jobs:
call-unit-tests:
# Only run release jobs on tags which have `jupyter-matlab-proxy` in them
if: ${{ contains(github.ref, 'jupyter-matlab-proxy') }}
# Run unit tests
uses: ./.github/workflows/run-unit-tests.yml
secrets: inherit
build_and_publish_pypi:
needs: [call-unit-tests]
if: success()
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
environment:
name: pypi
url: https://pypi.org/project/jupyter-matlab-proxy
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Python build dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel hatch
- name: Build Source and Binary wheel distributions
run: python3 -m hatch build -t wheel
- name: Publish to PyPI.
uses: pypa/gh-action-pypi-publish@release/v1