-
-
Notifications
You must be signed in to change notification settings - Fork 76
53 lines (43 loc) · 1.52 KB
/
publish.yml
File metadata and controls
53 lines (43 loc) · 1.52 KB
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
50
51
52
53
name: Publish Release
on:
workflow_run:
workflows:
- Daffodil Build
types:
- completed
workflow_dispatch:
env:
NX_KEY: ${{ secrets.NX_KEY }}
NG_BUILD_ENV: production
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
name: Publish
if: |
(github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.ref, 'refs/tags/v')) ||
(github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.ref || github.ref }}
fetch-depth: 1
- uses: graycoreio/github-actions/setup-node@main
with:
node-version: 22.21.x
use-stamp-cache: true
registry-url: 'https://registry.npmjs.org'
- uses: graycoreio/daffodil/.github/actions/setup-nx-remote-cache@develop
with:
cache-mode: read-only
read-only-azure-connection-string: ${{ secrets.AZURE_NX_CACHE_READONLY_CONNECTION_STRING }}
read-write-azure-connection-string: ${{ secrets.AZURE_NX_CACHE_READWRITE_CONNECTION_STRING }}
event-name: ${{ github.event_name }}
- run: npx nx run-many -t build
- uses: graycoreio/github-actions/set-versions-from-root@main
- run: npx nx run-many -t publish
if: >
github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.ref, 'refs/tags/v')