Workflow file for this run
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
name: Update library.properties and Create Release ZIP | |
on: | |
release: | |
types: [published] | |
jobs: | |
update-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Update library.properties version | |
run: | | |
VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//') | |
sed -i "s/^version=.*/version=$VERSION/" library.properties | |
- name: Commit changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add library.properties | |
git commit -m "Update version to $VERSION" | |
git push origin HEAD:main | |