-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (47 loc) · 1.37 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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'
- name: Publish packages
run: npx nx release publish --dry-run
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 }}