-
Notifications
You must be signed in to change notification settings - Fork 835
54 lines (50 loc) · 1.41 KB
/
pypi_build.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
50
51
52
53
54
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
name: PyPI Build
on:
schedule:
# 1pm UTC is 6am or 7am PT depending on daylight savings.
- cron: '0 13 * * *'
workflow_dispatch:
inputs:
upload-type:
description: 'Upload type'
required: true
default: 'pypi'
type: choice
options:
- 'pypi'
- 'no upload'
env:
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
jobs:
pypi-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
- name: Build Wheel 3.10
run: |
python/tflite_micro/pypi_build.sh cp310
- name: Build Wheel 3.11
run: |
python/tflite_micro/pypi_build.sh cp311
- name: Check Directory Output
run: |
ls -l bazel-pypi-out
- name: Install Twine
run: |
python -m pip install --upgrade pip setuptools wheel
pip install twine
- name: upload to pypi
if: |
github.event.inputs.upload-type == 'pypi' ||
github.event_name == 'schedule'
run: |
python/tflite_micro/pypi_upload.sh \
bazel-pypi-out/tflite_micro-*.whl