Skip to content

Update @l3-lib/ui-style #39105

Update @l3-lib/ui-style

Update @l3-lib/ui-style #39105

Workflow file for this run

name: Update @l3-lib/ui-style
on:
schedule:
- cron: "*/10 * * * *"
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch release version
run: |
echo "installed version"
node -p "require('./package.json').dependencies['@l3-lib/ui-style']"
echo "latest version"
npm show @l3-lib/ui-style version
echo "CURRENT_VERSION=$(node -p "require('./package.json').dependencies['@l3-lib/ui-style']")" >> $GITHUB_ENV
echo "LATEST_VERSION=$(npm show @l3-lib/ui-style version)" >> $GITHUB_ENV
- name: Read release version
id: read-release-version
run: |
echo "var current"
echo "${{ env.CURRENT_VERSION }}"
echo "var latest"
echo "${{ env.LATEST_VERSION }}"
echo ::set-output name=branch_exists::$([ -z "`git ls-remote --heads origin update-version/style-version-${{env.LATEST_VERSION}}`" ] && echo "false" || echo "true")
- name: Same version
if: ${{ env.CURRENT_VERSION == env.LATEST_VERSION }}
run: |
echo "same version"
- name: Not same version - install & check changes
id: git-check
if: ${{ env.CURRENT_VERSION != env.LATEST_VERSION && steps.read-release-version.outputs.branch_exists == 'false' }}
run: |
echo "Not same version"
npm install @l3-lib/ui-style@${{env.LATEST_VERSION}} --save-exact
echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Build react icons
if: steps.git-check.outputs.modified == 'true'
id: build-react-icons
run: |
npm install
npm run build:react-icons
echo ::set-output name=success::$(echo "true")
- name: Create a pr
if: steps.build-react-icons.outputs.success == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update version
committer: L3vels Style <[email protected]>
author: L3vels Style <[email protected]>
branch: update-version/style-version-${{env.LATEST_VERSION}}
title: "Upgrade icons"
body: |
New icons version
labels: |
PR: Icon 💎
assignees: orrgottlieb
reviewers: orrgottlieb
team-reviewers: |
owners
maintainers
draft: false