Skip to content

Merge pull request #79 from aaronmhl/refactor/avatar2 #4

Merge pull request #79 from aaronmhl/refactor/avatar2

Merge pull request #79 from aaronmhl/refactor/avatar2 #4

name: PUBLISH_COMPONENTS
on:
push:
branches: [main]
pull_request_target:
types: [closed]
jobs:
modify-components:
runs-on: ubuntu-latest
outputs:
components-changed: ${{ steps.components-changed.outputs.changed }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- uses: marceloprado/has-changed-path@v1
id: components-changed
with:
paths: packages/components/package.json
- run: echo components changed=${{ steps.components-changed.outputs.changed }}
publish-components:
runs-on: ubuntu-latest
needs: modify-components
if: needs.modify-components.outputs.components-changed == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
with:
version: 6.0.2
- run: pnpm install
- run: cd packages/components && npm run build
- run: cd packages/components && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.TDESIGN_NPM_TOKEN }}
- run: echo '${{ github.ref }} ... ${{ github.ref_name }}'
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"