ci: use a shared release workflow to enable npm OIDC #1
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: CI | |
on: | |
push: | |
paths-ignore: | |
- 'packages/docs/**' | |
- 'README.md' | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
issues: write | |
jobs: | |
build_and_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: pnpm/action-setup@v2 | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
- name: Lint | |
run: pnpm lint | |
- name: Test | |
run: pnpm test | |
- name: Upload code coverage | |
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
with: | |
coverageLocations: ${{github.workspace}}/packages/core/coverage/lcov.info:lcov | |
prefix: test | |
release: | |
if: github.ref_name == 'main' | |
needs: [build_and_check] | |
uses: ./.github/workflows/release.yml | |
with: | |
ref_name: ${{ github.ref_name }} | |
release_type: 'stable' | |
secrets: inherit |