This repository was archived by the owner on Oct 12, 2025. It is now read-only.
detection fix #98
This file contains hidden or 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: Publish to npm | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - app | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Set up .npmrc | |
| run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| - name: Create .env file | |
| run: echo "VITE_HELIUS_API_KEY=${{ secrets.VITE_HELIUS_API_KEY }}" >> .env | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build all packages | |
| run: yarn build | |
| - name: Detect changes in @ecency/sdk | |
| id: detect_sdk | |
| run: | | |
| if git diff --quiet HEAD^ HEAD -- packages/core; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Detect changes in @ecency/wallets | |
| id: detect_wallets | |
| run: | | |
| if git diff --quiet HEAD^ HEAD -- packages/wallets; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish @ecency/sdk | |
| if: steps.detect_sdk.outputs.changed == 'true' | |
| run: | | |
| cd packages/core | |
| npm publish --access public | |
| - name: Publish @ecency/wallets | |
| if: steps.detect_wallets.outputs.changed == 'true' | |
| run: | | |
| cd packages/wallets | |
| npm publish --access public |