Merge pull request #205 from mogeko/dependabot/github_actions/github-… #150
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 | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| name: Create PR or Deploy to Vercel Production | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: production | |
| url: ${{ steps.deployment.outputs.DEPLOYMENT_URL }} | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ github.actor }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| steps: | |
| - uses: actions/checkout@v6.0.0 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| - run: pnpm install --global vercel@latest | |
| - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - run: | | |
| vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | \ | |
| xargs -I {} echo "DEPLOYMENT_URL={}" >> "${GITHUB_OUTPUT}" | |
| id: deployment | |
| - name: Create Version PR or Deploy to Pages | |
| id: changesets | |
| uses: changesets/action@v1.5.3 | |
| with: | |
| commit: "chore(release): version packages" | |
| title: "chore(release): version packages" | |
| version: pnpm vite-node .github/changeset-version.ts | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_ENV: production |