|
| 1 | +name: CI/CD |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - beta |
| 8 | + - next |
| 9 | + pull_request: |
| 10 | + types: [opened, reopened, synchronize] |
| 11 | + |
| 12 | +env: |
| 13 | + FORCE_COLOR: 3 # Display chalk colors |
| 14 | + |
| 15 | +jobs: |
| 16 | + ci: |
| 17 | + name: CI |
| 18 | + runs-on: ubuntu-24.04-arm |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 |
| 21 | + - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 |
| 22 | + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f |
| 23 | + with: |
| 24 | + node-version-file: .node-version |
| 25 | + cache: pnpm |
| 26 | + - name: Install dependencies |
| 27 | + run: pnpm install |
| 28 | + - name: Run integration tests |
| 29 | + run: pnpm run ci |
| 30 | + - uses: 47ng/actions-slack-notify@main |
| 31 | + name: Notify on Slack |
| 32 | + if: always() |
| 33 | + with: |
| 34 | + status: ${{ job.status }} |
| 35 | + env: |
| 36 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 37 | + |
| 38 | + cd: |
| 39 | + name: Deployment |
| 40 | + runs-on: ubuntu-24.04-arm |
| 41 | + permissions: |
| 42 | + contents: write # to be able to publish a GitHub release |
| 43 | + issues: write # to be able to comment on released issues |
| 44 | + pull-requests: write # to be able to comment on released pull requests |
| 45 | + id-token: write # to enable use of OIDC for NPM provenance / trusted publishing |
| 46 | + needs: [ci] |
| 47 | + if: ${{ github.ref_name == 'main' || github.ref_name == 'beta' }} |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 |
| 50 | + - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 |
| 51 | + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f |
| 52 | + with: |
| 53 | + node-version-file: .node-version |
| 54 | + cache: pnpm |
| 55 | + - name: Install dependencies |
| 56 | + run: pnpm install --ignore-scripts --frozen-lockfile |
| 57 | + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies |
| 58 | + run: npm audit signatures |
| 59 | + - name: Build package |
| 60 | + run: pnpm build |
| 61 | + - name: Semantic Release |
| 62 | + run: ./node_modules/.bin/semantic-release |
| 63 | + env: |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments