Skip to content

Commit

Permalink
chore: update ci to build pr test package
Browse files Browse the repository at this point in the history
  • Loading branch information
youedd committed Feb 8, 2025
1 parent c29c66c commit d1f0657
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,34 @@ jobs:
- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
publish-package:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
scope: '@youedd'

- name: Install dependencies
run: yarn install

- name: Build package
run: yarn prepare

- name: Publish to GitHub Packages
run: |
sed -i 's|https://registry.npmjs.org/|https://npm.pkg.github.com/@youedd|g' package.json
npm version --no-git-tag-version --new-version 0.0.1-pr-${{ github.event.number }}
npm publish --tag pr-${{ github.event.number }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d1f0657

Please sign in to comment.