-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.22 KB
/
publish.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
---
name: publish
on:
push:
tags: # trigger the deploy job on tag creation
- "*" # Note: not all tags will result in allowed pypi version identifier
workflow_dispatch: # allows for manual trigger
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v1
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install and configure poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dynamic versioning plugin
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Publish Package
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
mkdir -p {{.ROBOT_DIR}}
curl -L -C - -o {{.ROBOT_DIR}}/robot.jar https://github.com/ontodev/robot/releases/download/v1.9.6/robot.jar
poetry config pypi-token.pypi "$PYPI_TOKEN"
poetry publish --build