Skip to content

Release Pieces

Release Pieces #49

name: Release Pieces
on:
workflow_dispatch:
push:
branches:
- master
jobs:
Release-Pieces:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Setup .npmrc
run: |
echo //npm.pkg.github.com/:_authToken=${{ secrets.NPM_GITHUB_TOKEN }} >> .npmrc
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} >>.npmrc
echo .npmrc
- name: Install dependencies
run: npm ci --ignore-scripts
env:
NPM_GITHUB_TOKEN: ${{ secrets.NPM_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: build packages
run: npx nx run-many --target=build --projects=tag:${{ vars.VENDOR_NAME}}
- name: Setup ~/.npmrc
run: |
cp .npmrc $HOME/.npmrc
- name: Show ~/.npmrc
run: |
cat $HOME/.npmrc
- name: publish pieces packages
run: npx ts-node tools/scripts/publish-pieces-to-npm.ts
env:
VENDOR_NAME: ${{ vars.VENDOR_NAME }}