11name : publish web ui
22
33on :
4- workflow_dispatch : # Allows manual trigger of the workflow
5- inputs :
6- current_version :
7- description : ' Current version to bump from (e.g., v1.2.3). If not provided, will auto-detect from git tags'
8- required : false
9- type : string
10- custom_version : # Optional input for a custom version
11- description : ' Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
12- required : false
13- type : string
14- token :
15- description : ' Personal Access Token'
16- required : false
17- default : " "
18- type : string
19- publish_ui :
20- description : ' Publish to NPM?'
21- required : true
22- default : true
23- type : boolean
244 workflow_call : # Allows trigger of the workflow from another workflow
255 inputs :
266 current_version :
3919 publish_ui :
4020 description : ' Publish to NPM?'
4121 required : true
42- default : true
4322 type : boolean
4423
24+ permissions :
25+ contents : read
26+ id-token : write
27+
4528jobs :
4629 publish-web-ui-npm :
4730 if : github.repository == 'feast-dev/feast'
4831 runs-on : ubuntu-latest
49- env :
50- # This publish is working using an NPM automation token to bypass 2FA
51- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
32+ environment : production
5233 steps :
5334 - uses : actions/checkout@v4
5435 - name : Determine current version
@@ -108,8 +89,10 @@ jobs:
10889 - name : Setup Node.js
10990 uses : actions/setup-node@v4
11091 with :
111- node-version-file : ' ./ui/.nvmrc '
92+ node-version : ' 22.14.0 '
11293 registry-url : ' https://registry.npmjs.org'
94+ - name : Update npm for trusted publishing
95+ run : npm install --global npm@11.5.1
11396 - name : Bump file versions (temporarily for Web UI publish)
11497 if : github.event.inputs.custom_version != ''
11598 env :
@@ -137,6 +120,3 @@ jobs:
137120 working-directory : ./ui
138121 if : github.event.inputs.publish_ui != 'false'
139122 run : npm publish
140- env :
141- # This publish is working using an NPM automation token to bypass 2FA
142- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments