Skip to content

Merge pull request #554 from Groww-OSS/develop #12

Merge pull request #554 from Groww-OSS/develop

Merge pull request #554 from Groww-OSS/develop #12

Workflow file for this run

name: Icon_Store_Build
on:
push:
branches: [ main ]
paths:
- 'packages/icon-store/**'
env:
package_dir: 'packages'
package_name: 'icon-store'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v2
with:
node-version: 16.14.0
registry-url: https://registry.npmjs.org/
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Check package version
id: cpv
uses: PostHog/check-package-version@v2
with:
path: '${{env.package_dir}}/${{env.package_name}}'
- name: Echo output
run: |
echo "Committed version: ${{ steps.cpv.outputs.committed-version }}"
echo "Published version: ${{ steps.cpv.outputs.published-version }}"
echo "Is new version: ${{ steps.cpv.outputs.is-new-version }}"
- run: |
git config --global user.email "web-core@groww.in"
git config --global user.name "baabu-ji"
- run: |
pnpm install
pnpm run build --filter="@groww-tech/${{env.package_name}}"
- if: steps.cpv.outputs.is-new-version == 'true'
uses: ./.github/workflows/actions/pnpm_publish
with:
github_token: ${{secrets.GIT_TOKEN_WEB_OSS}}
npm_token: ${{secrets.NPM_TOKEN_WEB_OSS}}
path: './${{env.package_dir}}/${{env.package_name}}'