Capi 245 ugs sonarcloud #35
Workflow file for this run
This file contains 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 and Release | |
on: | |
pull_request: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/iron' | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/iron' | |
- run: yarn install --frozen-lockfile | |
- run: yarn test | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/iron' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
publish: | |
if: github.event_name == 'release' && github.event.action == 'created' | |
needs: [lint, test, build] | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/iron' | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn publish --non-interactive | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |