Merge pull request #305 from KateOrient/feature/fix-tree-element-search #245
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: Increment GUI version | |
on: | |
push: | |
branches: [ master ] | |
env: | |
DATE_ENV_VARIABLE: REACT_APP_VERSION_DATE | |
jobs: | |
test-commit-message: | |
runs-on: ubuntu-latest | |
outputs: | |
is_version: ${{ steps.validation.outputs.is_version }} | |
steps: | |
- id: validation | |
run: echo "::set-output name=is_version::$([[ '${{ github.event.head_commit.message }}' =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo true || echo false)" | |
- name: Matches version pattern | |
run: echo "${{ steps.validation.outputs.is_version }}" | |
version-update: | |
needs: test-commit-message | |
if: ${{ needs.test-commit-message.outputs.is_version == 'false' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: false | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.x' | |
- name: Increment package version | |
run: yarn version --patch --no-commit-hooks --no-git-tag-version | |
- name: Get latest version | |
id: package-version | |
run: echo "::set-output name=current-version::$(cat ./package.json | grep -o '"version":.*$' | sed -e 's/[^0-9.]//g')" | |
- name: Get version update date | |
id: date | |
run: echo "::set-output name=date::$(date '+%B %-d, %Y')" | |
- name: Update GUI version date | |
run: sed -i "s/${{ env.DATE_ENV_VARIABLE }}=.*/${{ env.DATE_ENV_VARIABLE }}=${{ steps.date.outputs.date }}/" .env | |
- name: Update landing version | |
run: echo "${{ steps.package-version.outputs.current-version }} - ${{ steps.date.outputs.date }}" > ./landing/assets/version.txt | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: v${{ steps.package-version.outputs.current-version }} | |