Skip to content

Commit c47b134

Browse files
authored
fix: Standalone Web UI Publish Workflow (#5498)
Signed-off-by: ntkathole <[email protected]>
1 parent 182329b commit c47b134

File tree

3 files changed

+92
-31
lines changed

3 files changed

+92
-31
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
required: true
1616
default: ""
1717
type: string
18+
publish_ui:
19+
description: 'Publish to NPM?'
20+
required: true
21+
default: true
22+
type: boolean
1823
workflow_call: # Allows trigger the workflow from other workflow
1924
inputs:
2025
custom_version: # Optional input for a custom version
@@ -26,6 +31,11 @@ on:
2631
required: true
2732
default: ""
2833
type: string
34+
publish_ui:
35+
description: 'Publish to NPM?'
36+
required: true
37+
default: true
38+
type: boolean
2939

3040
jobs:
3141
publish-python-sdk:
@@ -50,3 +60,12 @@ jobs:
5060
with:
5161
custom_version: ${{ github.event.inputs.custom_version }}
5262
token: ${{ github.event.inputs.token }}
63+
64+
publish-web-ui:
65+
uses: ./.github/workflows/publish_web_ui.yml
66+
needs: [ publish-python-sdk ]
67+
secrets: inherit
68+
with:
69+
custom_version: ${{ github.event.inputs.custom_version }}
70+
token: ${{ github.event.inputs.token || github.token }}
71+
publish_ui: ${{ github.event.inputs.publish_ui != 'false' }}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: publish web ui
2+
3+
on:
4+
workflow_dispatch: # Allows manual trigger of the workflow
5+
inputs:
6+
custom_version: # Optional input for a custom version
7+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
8+
required: false
9+
type: string
10+
token:
11+
description: 'Personal Access Token'
12+
required: true
13+
default: ""
14+
type: string
15+
publish_ui:
16+
description: 'Publish to NPM?'
17+
required: true
18+
default: true
19+
type: boolean
20+
workflow_call: # Allows trigger of the workflow from another workflow
21+
inputs:
22+
custom_version: # Optional input for a custom version
23+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
24+
required: false
25+
type: string
26+
token:
27+
description: 'Personal Access Token'
28+
required: true
29+
default: ""
30+
type: string
31+
publish_ui:
32+
description: 'Publish to NPM?'
33+
required: true
34+
default: true
35+
type: boolean
36+
37+
jobs:
38+
publish-web-ui-npm:
39+
if: github.repository == 'feast-dev/feast'
40+
runs-on: ubuntu-latest
41+
env:
42+
# This publish is working using an NPM automation token to bypass 2FA
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
- id: get-version
47+
uses: ./.github/actions/get-semantic-release-version
48+
with:
49+
custom_version: ${{ github.event.inputs.custom_version }}
50+
token: ${{ github.event.inputs.token || github.token }}
51+
- name: Setup Node.js
52+
uses: actions/setup-node@v3
53+
with:
54+
node-version-file: './ui/.nvmrc'
55+
- name: Bump file versions (temporarily for Web UI publish)
56+
env:
57+
CURRENT_VERSION: ${{ steps.get-version.outputs.current_version }}
58+
NEXT_VERSION: ${{ steps.get-version.outputs.version_without_prefix }}
59+
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
60+
- name: Install yarn dependencies
61+
working-directory: ./ui
62+
run: yarn install
63+
- name: Build yarn rollup
64+
working-directory: ./ui
65+
run: yarn build:lib
66+
- name: Publish UI package
67+
working-directory: ./ui
68+
if: github.event.inputs.publish_ui != 'false'
69+
run: npm publish
70+
env:
71+
# This publish is working using an NPM automation token to bypass 2FA
72+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -112,40 +112,10 @@ jobs:
112112
- name: Build & version operator-specific release files
113113
run: make -C infra/feast-operator build-installer bundle
114114

115-
publish-web-ui-npm:
116-
needs: [ validate_version_bumps, get_dry_release_versions ]
117-
runs-on: ubuntu-latest
118-
env:
119-
# This publish is working using an NPM automation token to bypass 2FA
120-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
121-
CURRENT_VERSION: ${{ needs.get_dry_release_versions.outputs.current_version }}
122-
NEXT_VERSION: ${{ needs.get_dry_release_versions.outputs.next_version }}
123-
steps:
124-
- uses: actions/checkout@v4
125-
- name: Setup Node.js
126-
uses: actions/setup-node@v3
127-
with:
128-
node-version-file: './ui/.nvmrc'
129-
- name: Bump file versions (temporarily for Web UI publish)
130-
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
131-
- name: Install yarn dependencies
132-
working-directory: ./ui
133-
run: yarn install
134-
- name: Build yarn rollup
135-
working-directory: ./ui
136-
run: yarn build:lib
137-
- name: Publish UI package
138-
working-directory: ./ui
139-
if: github.event.inputs.dry_run == 'false' && github.event.inputs.publish_ui == 'true'
140-
run: npm publish
141-
env:
142-
# This publish is working using an NPM automation token to bypass 2FA
143-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
144-
145115
release:
146116
name: release
147117
runs-on: ubuntu-latest
148-
needs: publish-web-ui-npm
118+
needs: validate_version_bumps
149119
env:
150120
GITHUB_TOKEN: ${{ github.event.inputs.token }}
151121
GIT_AUTHOR_NAME: feast-ci-bot

0 commit comments

Comments
 (0)