Skip to content

Workflow file for this run

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