-
Notifications
You must be signed in to change notification settings - Fork 134
48 lines (40 loc) · 1.28 KB
/
publish-pplib-python.yaml
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
name: Publish PPLib Python Release
on:
workflow_dispatch:
inputs:
version:
type: string
description: The full version string, i.e. 2024.0.0-alpha-1 or 2024.1.1
required: true
jobs:
build:
name: "Build & Publish to PyPI"
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/project/robotpy-pathplannerlib/
permissions:
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
working-directory: ./pathplannerlib-python
run: |
python -m pip install --upgrade pip
pip install build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Set version
run: sed -i "s/0.0.0/${{ github.event.inputs.version }}/g" pyproject.toml
working-directory: ./pathplannerlib-python
- name: Build
working-directory: ./pathplannerlib-python
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: pathplannerlib-python/dist/