Update package.json #64
Workflow file for this run
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: Release React Native Platform | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release-react-native: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PELAGORNIS }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| - name: Update React Native package versions | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| # Update React Native package version | |
| sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" packages/react-native-icons/package.json | |
| echo "✅ Updated React Native package version to $VERSION" | |
| - name: Commit and Push version changes | |
| run: | | |
| echo "Committing and pushing version changes..." | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git config --local init.defaultBranch main | |
| # Make our changes | |
| git add packages/react-native-icons/package.json | |
| git status | |
| git diff --cached | |
| # Commit changes | |
| git commit -m "chore(react-native): bump package version to ${{ steps.get_version.outputs.version }} | |
| - Update packages/react-native-icons/package.json version | |
| - Triggered by tag: ${{ github.ref }} | |
| - Workflow: ${{ github.workflow }} | |
| - Commit: ${{ github.sha }}" | |
| # Try to push, if fails, pull and retry | |
| for i in {1..3}; do | |
| if git push origin HEAD:main; then | |
| echo "✅ Successfully pushed version changes" | |
| break | |
| else | |
| echo "Push failed, attempt $i/3. Pulling latest changes..." | |
| git pull origin main --rebase | |
| sleep 2 | |
| fi | |
| done | |
| - name: Build React Native platform | |
| run: | | |
| npm run generate:metadata | |
| echo "React Native icons generation completed" | |
| - name: Build React Native Icons | |
| run: | | |
| cd packages/react-native-icons | |
| npm run build | |
| - name: Publish React Native Icons to npm | |
| run: | | |
| cd packages/react-native-icons | |
| npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} | |
| - name: Create React Native Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.version }} | |
| body: | | |
| ## 🎉 React Native Platform Release ${{ steps.get_version.outputs.version }} | |
| ### 📦 NPM Package | |
| ```bash | |
| npm install @refineui/react-native-icons@${{ steps.get_version.outputs.version }} | |
| ``` | |
| ### 📱 Features | |
| - React Native optimized components | |
| - TypeScript support with full type safety | |
| - Touch interactions and accessibility | |
| - 434+ icons with multiple sizes and styles | |
| - Mobile-optimized rendering | |
| ### 📁 Font Files | |
| Font files are available in the attached zip archive. | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PELAGORNIS }} |