Publish libraries #41
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: Publish libraries | |
on: | |
workflow_dispatch: | |
env: | |
NODE: 18 | |
HUSKY: 0 | |
jobs: | |
ci_tests: | |
uses: ./.github/workflows/ci_tests.yml | |
ci_publish: | |
needs: ci_tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE }} | |
registry-url: https://registry.npmjs.org/ | |
cache: npm | |
- name: Install latest npm | |
run: npm install -g npm@latest | |
- name: Cache .angular and node_modules | |
uses: actions/cache@v3 | |
id: cache-step | |
with: | |
key: cache-ubuntu-latest-node${{ env.NODE }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
cache-ubuntu-latest-node${{ env.NODE }}- | |
path: | | |
.angular/cache | |
node_modules | |
- name: Install dependencies | |
if: steps.cache-step.outputs.cache-hit != 'true' | |
run: npm clean-install --engine-strict | |
- name: Build auth-js | |
working-directory: projects/auth-js | |
run: npm run build | |
- name: Build ngx-auth | |
working-directory: projects/ngx-auth | |
run: npm run build | |
- name: Run semantic-release | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npm run publish |