chore(deps): update dependency typescript to ^5.7.2 #999
This file contains 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 | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
on: | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- dist/* | |
push: | |
branches: [main] | |
paths-ignore: | |
- dist/* | |
tags: | |
- v*.*.* | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20 | |
- run: pnpm i --frozen-lock | |
- run: pnpm type-check | |
- run: pnpm biome ci . | |
- run: pnpm build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: actions-vercel-dist | |
path: ./dist | |
- name: Commit dist files | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add ./dist | |
git commit -m "build: update \`dist\` files" || true | |
git push | |
deploy: | |
needs: [build] | |
name: Deploy | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
deployments: write | |
statuses: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: actions-vercel-dist | |
path: ./dist | |
- uses: ./ | |
id: vercel | |
with: | |
token: ${{ secrets.VERCEL_TOKEN }} | |
prebuilt: true | |
production: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' }} | |
project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
org-id: ${{ secrets.VERCEL_ORG_ID }} | |
- run: | | |
echo ${{ steps.vercel.outputs.deployment-url }} | |
echo ${{ steps.vercel.outputs.deployment-status }} | |
release: | |
name: Release | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/') && github.actor != 'github-actions' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20 | |
- name: Setup git-cliff | |
uses: kenji-miyake/setup-git-cliff@v2 | |
- uses: actions/github-script@v7 | |
id: git-cliff | |
with: | |
result-encoding: string | |
script: | | |
const { stdout } = await exec.getExecOutput('git', ['cliff', '-l', '--strip', 'header']) | |
return stdout | |
- name: Create draft release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
body: ${{ steps.git-cliff.outputs.result }} | |
tag: | |
needs: [build] | |
name: Tag | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') && github.actor != 'github-actions' | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Get target tag | |
id: tag | |
run: echo "name=$(echo '${{ github.ref }}' | sed -r 's/refs\/tags\/(v[0-9]+)\..*/\1/')" >> $GITHUB_OUTPUT | |
- name: Update & Push tag | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git tag -f ${{ steps.tag.outputs.name }} ${{ github.ref }} | |
git push -f --tags origin ${{ steps.tag.outputs.name }} |