Skip to content

Commit 7f37e90

Browse files
authored
ci: fix build asset packing (#705)
1 parent 9158050 commit 7f37e90

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.github/workflows/publication.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ jobs:
1919
- run: npm publish
2020
env:
2121
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
22-
- run: npm run build:embedded
23-
- name: Embedded UI Artifact Upload
22+
- run: npm run build:embedded:archive
23+
- run: gh release upload ${{ github.event.release.tag_name }} $ASSET_NAME.zip
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
26-
run: |
27-
mv build /tmp/$ASSET_NAME
28-
cd /tmp
29-
zip -r $ASSET_NAME.zip $ASSET_NAME
30-
gh release upload ${{ github.event.release.tag_name }} $ASSET_NAME.zip
3126
- name: Embedded UI Refresh Event Dispatch
3227
uses: peter-evans/repository-dispatch@v2
3328
continue-on-error: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# production
1212
/build
1313
/dist
14+
*.zip
1415

1516
# misc
1617
.idea

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"build": "rm -rf build && DISABLE_ESLINT_PLUGIN=true react-app-rewired build",
5757
"//build:embedded": "echo 'PUBLIC_URL is a setting for create-react-app. Embedded version is built and hosted as is on ydb servers, with no way of knowing the final URL pattern. PUBLIC_URL=. keeps paths to all static relative, allowing servers to handle them as needed'",
5858
"build:embedded": "GENERATE_SOURCEMAP=false PUBLIC_URL=. REACT_APP_BACKEND=http://localhost:8765 npm run build",
59+
"build:embedded:archive": "npm run build:embedded && mv build embedded-ui && zip -r embedded-ui.zip embedded-ui && rm -rf embedded-ui",
5960
"lint:styles": "stylelint 'src/**/*.scss'",
6061
"unimported": "npx unimported --no-cache",
6162
"package": "rm -rf dist && copyfiles -u 1 'src/**/*' dist",

0 commit comments

Comments
 (0)