-
Notifications
You must be signed in to change notification settings - Fork 94
46 lines (43 loc) · 1.16 KB
/
main.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
name: prototool
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- '*'
jobs:
prototool:
name: prototool linter
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Run prototool
run: docker run -v "$(pwd):/work" uber/prototool:1.10.0 prototool lint protos
deploy:
name: deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install prerequisites
run: pip install --user auditwheel twine
- name: Create wheel
working-directory: ./pb_plugins
run: python setup.py bdist_wheel
- name: Upload as CI artefact
uses: actions/upload-artifact@v2
with:
name: protoc-gen-mavsdk.whl
path: ./pb_plugins/dist/*.whl
retention-days: 2
- name: Deploy to PyPi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_NON_INTERACTIVE: 1
if: startsWith(github.ref, 'refs/tags/')
run: |
export PATH=$PATH:$HOME/.local/bin
twine upload ./pb_plugins/dist/*.whl