-
Notifications
You must be signed in to change notification settings - Fork 152
42 lines (41 loc) · 1.3 KB
/
regenerate-library.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
name: Regenerate Python Library
on:
workflow_dispatch:
inputs:
library_version:
description: 'The version of the new library'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up pipenv
uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashfiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install --deploy
- name: Delete folder
run: |
rm -rf meraki
- name: Regenerate Python Library
run: |
pipenv run python generator/generate_library.py -g true -v ${{ github.event.inputs.library_version }}
- name: Commit changes to new branch
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Action
author_email: support@meraki.com
message: Automatically regenerated library to version ${{ github.event.inputs.library_version }}.
new_branch: release