fix: resolve default version via npm latest dist-tag #19
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| registry-url: https://npm.pkg.github.com | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
| - run: vp check | |
| - run: vp build | |
| - run: vp test | |
| staging-deploy: | |
| needs: test | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| registry-url: https://npm.pkg.github.com | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
| - run: vpx void deploy | |
| env: | |
| VOID_TOKEN: ${{ secrets.VOID_TOKEN }} | |
| VOID_PROJECT: vp-setup-staging | |
| - name: Comment on PR | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: '✅ Staging deployment successful!\n\nPreview: https://vp-setup-staging.void.app/' | |
| }) |