Merge pull request #19 from dev-phantom/cicd #14
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, develop] | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Build shared package | |
| run: | | |
| cd packages/shared | |
| npm install --legacy-peer-deps | |
| npm run build | |
| - name: Build core package | |
| run: | | |
| cd packages/core | |
| npm install --legacy-peer-deps | |
| npm run build | |
| - name: Build CLI package | |
| run: | | |
| cd packages/cli | |
| npm install --legacy-peer-deps | |
| npm run build | |
| - name: Run tests | |
| run: | | |
| cd packages/shared && npm test || true | |
| cd ../core && npm test || true | |
| cd ../cli && npm test || true | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npx semantic-release |