-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new GitHub action (regenerate-library.yml)
The new action auto-regenerates the Python library upon creation of a new release.
- Loading branch information
1 parent
c8b6b13
commit ebf3f97
Showing
3 changed files
with
53 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Regenerate Python Library | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set release name as environment variable | ||
run: echo "RELEASE_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Delete folder | ||
run: | | ||
rm -rf meraki | ||
- name: Regenerate Python Library | ||
run: | | ||
python generator/generate_library.py -g true -v $RELEASE_NAME | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name "GitHub Action on behalf of TKIPisalegacycipher" | ||
git add . | ||
git commit -m "Auto-update library to release version $RELEASE_NAME." | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.ACTION_RUNNER_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters