v1.14.7 #8
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 Podspec Version | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Create new branch | |
run: | | |
git checkout -b update-version-${{ github.event.release.tag_name }} | |
- name: Update version | |
run: | | |
VERSION=$(echo ${{ github.event.release.tag_name }} | cut -c 2-) # remove the v from the tag name | |
sed -i 's/\(s.version\s*=\s*\).*$/\1'"\"$VERSION\""'/g' Fula.podspec | |
sed -i 's/#{s.version}/'"$VERSION"'/g' Fula.podspec | |
- name: Set up Git | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
- name: Commit and push | |
run: | | |
git add . | |
git commit -m "Update version to $VERSION" | |
git push origin update-version-${{ github.event.release.tag_name }} | |
- name: Create Pull Request | |
uses: gh-actions-contrib/create-pull-request@v3 | |
with: | |
title: 'Update version to ${{ env.VERSION }}' | |
body: 'Automatically update version number.' | |
labels: 'version update, automated pr' | |
branch: 'update-version-${{ github.event.release.tag_name }}' | |
draft: false |