Publish #35
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 | |
on: | |
# workflow_run: | |
# workflows: [ "Create Releases" ] | |
# types: | |
# - completed | |
workflow_dispatch: | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true | |
jobs: | |
publish: | |
#if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
actions: "read" | |
id-token: "write" # needed for provenance data generation | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Npm install | |
uses: ./.github/actions | |
- name: Restore cached .nx | |
id: cache-nx-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
.nx | |
key: ${{ runner.os }}-nx-master | |
- run: npx nx affected -t build --parallel=3 --exclude='json-api-front,json-api-server,json-api-server-e2e,shared-utils,json-shared-type,database' | |
- run: ls -l ./dist/libs/json-api/json-api-nestjs-sdk | |
- name: Publish packages | |
run: npx nx release publish | |
shell: bash | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true | |
- name: Save cached .nx | |
id: cache-dependencies-save | |
uses: actions/cache/save@v4 | |
with: | |
path: | | |
.nx | |
key: ${{ steps.cache-nx-restore.outputs.cache-primary-key }} |