npm i #149
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: npm-publish | |
on: | |
push: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build: | |
name: npm-publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
attestations: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build -- --configuration=production | |
- name: Test | |
run: npm run test -- --watch=false --parallel=true | |
## ng-canvas-resizer | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/ng-canvas-resizer/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/ng-canvas-resizer/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## player-provider | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/player-provider/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/player-provider/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## player-progress | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/player-progress/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/player-progress/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## video-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/video-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/video-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## ng-video-player | |
- name: Push to NPM | |
id: publish_ng_video_player | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/frameworks/ng-video-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/frameworks/ng-video-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## facebook-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/facebook-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/facebook-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## mixcloud-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/mixcloud-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/mixcloud-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## dailymotion-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/dailymotion-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/dailymotion-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## soundcloud-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/soundcloud-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/soundcloud-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## spotify-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/spotify-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/spotify-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## streamable-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/streamable-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/streamable-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## twitch-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/twitch-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/twitch-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## vidyard-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/vidyard-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/vidyard-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## vimeo-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/vimeo-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/vimeo-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## wistia-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/wistia-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/wistia-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## youtube-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/youtube-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/youtube-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## file-player | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/file-player/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/platforms/file-player/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
## playlist-controller | |
- name: Push to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/playlist-controller/package.json' | |
registry: 'https://registry.npmjs.org' | |
token: ${{ secrets.PUBLISH_TO_NPMJS }} | |
access: 'public' | |
provenance: true | |
- name: Push to Github | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
package: 'dist/libs/playlist-controller/package.json' | |
registry: 'https://npm.pkg.github.com' | |
token: ${{ github.token }} | |
access: 'public' | |
provenance: true | |
# Publish to GitHub Container Registry | |
- name: Authenticate with GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
## Angular app | |
- name: Extract tags/labels | |
id: meta-ghcr-angular | |
uses: docker/metadata-action@v5 | |
with: | |
github-token: ${{ github.token }} | |
images: | | |
ghcr.io/${{ github.repository }}-angular | |
- name: Publish to Github Container Registry | |
id: push-ghcr-angular | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./apps/angular-demo/Dockerfile | |
push: true | |
tags: ${{ steps.meta-ghcr-angular.outputs.tags }} | |
labels: ${{ steps.meta-ghcr-angular.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-name: ghcr.io/${{ github.repository }}-angular | |
subject-digest: ${{ steps.push-ghcr-angular.outputs.digest }} | |
push-to-registry: true | |
- name: Trigger deploy hook | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: ${{ secrets.SLIPLANE_ANGULAR_DEPLOY_HOOK }} | |
method: GET | |
## React app | |
- name: Extract tags/labels | |
id: meta-ghcr-react | |
uses: docker/metadata-action@v5 | |
with: | |
github-token: ${{ github.token }} | |
images: | | |
ghcr.io/${{ github.repository }}-react | |
- name: Publish to Github Container Registry | |
id: push-ghcr-react | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./apps/react-demo/Dockerfile | |
push: true | |
tags: ${{ steps.meta-ghcr-react.outputs.tags }} | |
labels: ${{ steps.meta-ghcr-react.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-name: ghcr.io/${{ github.repository }}-react | |
subject-digest: ${{ steps.push-ghcr-react.outputs.digest }} | |
push-to-registry: true | |
- name: Trigger deploy hook | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: ${{ secrets.SLIPLANE_REACT_DEPLOY_HOOK }} | |
method: GET |