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 0dff817
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 }}"
generate-test-package:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Generate tarball
run: npm pack

- name: Upload tarball as artifact
id: artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: "*.tgz"

- name: Comment on PR with package link
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMENT="📦 A new package has been generated: ${{ steps.artifact.outputs.artifact-url }}"
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
gh pr comment "$PR_NUMBER" --body "$COMMENT"

0 comments on commit 0dff817

Please sign in to comment.