Skip to content

Commit 5b482d7

Browse files
ci: Update Release Flow (#574)
Co-authored-by: Andrei Vishniakov <[email protected]>
1 parent 9307136 commit 5b482d7

File tree

3 files changed

+41
-15
lines changed

3 files changed

+41
-15
lines changed

legacy/.github/workflows/release.yml renamed to .github/workflows/release.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- '*'
7+
- "*"
88

99
jobs:
1010
release:
@@ -13,44 +13,71 @@ jobs:
1313
steps:
1414
- name: Checkout Repository
1515
uses: actions/checkout@v2
16+
1617
- name: Get the version from the github tag ref
1718
id: get_version
1819
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
20+
1921
- uses: actions/setup-node@v3
2022
with:
21-
node-version: 18.16.0
23+
node-version: 20
24+
2225
- name: Install yarn
2326
run: npm install --global yarn
24-
- name: Build
27+
28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: latest
32+
33+
- name: Build old dashboard
34+
working-directory: ./legacy
2535
run: |
2636
yarn install
2737
yarn build
2838
env:
29-
REACT_APP_HUB_API_URL: 'https://hubapi.zenml.io'
30-
REACT_APP_BASE_API_URL: '/api/v1'
39+
REACT_APP_HUB_API_URL: "https://hubapi.zenml.io"
40+
REACT_APP_BASE_API_URL: "/api/v1"
3141
REACT_APP_MOCKAPI_RESPONSE: false
32-
REACT_APP_USE_COOKIE: 'true'
42+
REACT_APP_USE_COOKIE: "true"
3343
REACT_APP_VERSION: ${{ steps.get_version.outputs.VERSION }}
44+
45+
- name: Build new dashboard
46+
run: |
47+
pnpm install --frozen-lockfile
48+
pnpm build
49+
env:
50+
VITE_API_BASE_URL: "/api/v1"
51+
VITE_FRONTEND_VERSION: ${{ steps.get_version.outputs.VERSION }}
52+
VITE_FEATURE_OS_KEY: ${{ secrets.FEATURE_OS_KEY }}
53+
3454
- name: Generate Changelog
3555
uses: heinrichreimer/[email protected]
3656
with:
3757
token: ${{ secrets.GITHUB_TOKEN }}
38-
pullRequests: 'false'
39-
onlyLastTag: 'true'
40-
stripGeneratorNotice: 'true'
41-
issuesWoLabels: 'true'
42-
stripHeaders: 'true'
58+
pullRequests: "false"
59+
onlyLastTag: "true"
60+
stripGeneratorNotice: "true"
61+
issuesWoLabels: "true"
62+
stripHeaders: "true"
63+
4364
- name: Create release archive
4465
run: |
45-
tar -zcf zenml-dashboard.tar.gz -C build --transform="s#\.\/##" .
66+
tar -zcf zenml-dashboard-legacy.tar.gz -C ./legacy/build --transform="s#\.\/##" .
67+
sha256sum -b zenml-dashboard-legacy.tar.gz > zenml-dashboard-legacy.tar.gz.sha256
68+
tar -zcf zenml-dashboard.tar.gz -C dist --transform="s#\.\/##" .
4669
sha256sum -b zenml-dashboard.tar.gz > zenml-dashboard.tar.gz.sha256
70+
71+
4772
- name: Release to GitHub
4873
uses: softprops/action-gh-release@v1
4974
with:
5075
files: |
76+
zenml-dashboard-legacy.tar.gz
77+
zenml-dashboard-legacy.tar.gz.sha256
5178
zenml-dashboard.tar.gz
5279
zenml-dashboard.tar.gz.sha256
5380
body_path: ./CHANGELOG.md
54-
prerelease: 'true'
81+
prerelease: "true"
5582
env:
5683
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

legacy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"prettier:fix": "prettier --write './src/**/*.{ts,tsx}'",
7373
"prettier:check": "prettier --check './src/**/*.{ts,tsx}'",
7474
"all": "eslint './src/**/*.ts*' & react-scripts test --all & tsc",
75-
"prepare": "husky install",
75+
"prepare": "cd .. && husky install legacy/.husky",
7676
"storybook": "start-storybook -p 6006 -s public",
7777
"build-storybook": "build-storybook -s public"
7878
},

public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)