Update verison #13
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 verison | |
on: | |
workflow_dispatch: | |
inputs: | |
libraryVersion: | |
description: 'Library Version' | |
required: true | |
default: '' | |
packageVersion: | |
description: 'Package Version' | |
required: true | |
default: '' | |
jobs: | |
# Set version in package.json, git tag | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Update Library Version | |
run: | | |
sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' scripts/*.sh | |
sed -i '/lexactivator_version =/!b;c$lexactivator_version ="v${{ github.event.inputs.libraryVersion }}"' scripts/*.ps1 | |
- name: Update Package Version | |
run: | | |
sed -i '/"version":/!b;c \ \ "version": "${{ github.event.inputs.packageVersion }}",' package.json | |
- name: Commit, Tag and Push | |
run: | | |
git add package.json | |
git add scripts/*.* | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -m "chore(package version): updated version" | exit 0 | |
git tag ${{ github.event.inputs.packageVersion }} | |
git push & git push --tags |