Enhance release workflow by adding global TypeScript installation ste… #4
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: Semantic Release | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| release: | |
| name: Release version | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build action | |
| run: npm run build | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Run tests | |
| run: npm test | |
| - name: Install TypeScript globally | |
| run: npm install -g typescript | |
| - name: Semantic Release | |
| uses: cycjimmy/semantic-release-action@v4.1.0 | |
| with: | |
| extra_plugins: | | |
| @semantic-release/changelog | |
| @semantic-release/commit-analyzer | |
| @semantic-release/git | |
| @semantic-release/npm | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |