Skip to content

Update dependency tsx to v4.11.0 #306

Update dependency tsx to v4.11.0

Update dependency tsx to v4.11.0 #306

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- "renovate/**"
- "dependabot/**"
pull_request_target:
types: [opened, synchronize, reopened]
workflow_dispatch:
env:
CHECKOUT_REF: ${{ github.event.pull_request.head.sha || github.sha }}
CHECKOUT_ENV: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'production' || 'development'}}
jobs:
build:
runs-on: ubuntu-latest
if: "${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/pull/') }}"
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
- uses: docker/setup-buildx-action@v3
- uses: crazy-max/ghaction-github-runtime@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Publish
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
id: publish
run: |
pnpm config set '//registry.npmjs.org/:_authToken' '${{ secrets.NPM_TOKEN }}'
pnpm -r publish --provenance --access public --no-git-checks
- name: Publish (dry-run)
if: steps.publish.outcome != 'success'
run: pnpm -r publish --dry-run --no-git-checks
- name: Fild dist directories
id: find-dists
run: |
echo 'dirs<<EOF' >> $GITHUB_OUTPUT
for dir in $(find . -type d -name "*dist" -not -path "*/node_modules/*"); do
echo $dir >> $GITHUB_OUTPUT
done
echo 'EOF' >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: dists
path: ${{ steps.find-dists.outputs.dirs }}
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
- uses: actions/download-artifact@v4
with:
name: dists
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: amondnet/vercel-action@v25 #deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: ${{ github.event_name == 'pull_request_target' }}
vercel-args: ${{ env.CHECKOUT_ENV == 'production' && '--prod' || ''}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}