Merge pull request #6 from godaddy/fix/release-npm-auth #33
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: CICD | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| cicd: | |
| runs-on: ubuntu-latest | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev build-essential python3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Type check | |
| run: pnpm run check | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Create Release Pull Request or Publish | |
| if: github.ref == 'refs/heads/main' | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm run release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_SECRET }} |