chore: use trusted publishers for npm publish (#48) #27
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: publish to npm | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: | | |
| docker build . --target=test-components -t zvoove-angular-components:test-comp | |
| docker build . --target=test-schematics -t zvoove-angular-components:test-schem | |
| docker build . --target=linter -t zvoove-angular-components:lint | |
| name: build ci images | |
| - run: docker run --rm zvoove-angular-components:lint | |
| name: run linter | |
| - run: docker run --rm zvoove-angular-components:test-comp | |
| name: test components | |
| - run: docker run --rm zvoove-angular-components:test-schem | |
| name: test schematics | |
| - run: npm ci | |
| - run: npm run build:components | |
| - name: Publish to npm | |
| id: publish | |
| uses: JS-DevTools/npm-publish@v3 | |
| with: | |
| package: ./dist/components/package.json |