Skip to content

Commit

Permalink
Prepare for 0.2.1 patch release
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckless-Satoshi committed Sep 29, 2022
1 parent 4362530 commit a6cbff8
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 74 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ jobs:
uses: actions/checkout@v3

- name: 'Download main.js Artifact'
if: inputs.semver == '' # Only if workflow fired from frontend-build.yml
uses: dawidd6/action-download-artifact@v2
with:
workflow: frontend-build.yml
workflow_conclusion: success
name: mobile-main-js
path: mobile/html/Web.bundle/js/

- name: 'Download main.js Artifact for a release'
if: inputs.semver != '' # Only if fired as job in release.yml
uses: actions/download-artifact@v3
with:
name: mobile-main-js
path: mobile/html/Web.bundle/js/

- name: 'Install npm Dependencies'
run: |
cd mobile
Expand Down Expand Up @@ -71,8 +79,8 @@ jobs:
path: mobile/android/app/build/outputs/apk/release/app-release.apk

- name: 'Upload .apk Debug Artifact (for Pre-release)'
if: inputs.semver == '' # Only build debug if this is a pre-release
uses: actions/upload-artifact@v3
if: inputs.semver != '' # only if this workflow is not called from a push to tag (a Release)
with:
name: robosats-debug-${{ steps.commit.outputs.short }}.apk
path: mobile/android/app/build/outputs/apk/debug/app-debug.apk
Expand All @@ -86,6 +94,7 @@ jobs:
with:
tag_name: android-${{ steps.commit.outputs.short }}
release_name: robosats-android-${{ steps.commit.outputs.short }}
changelog: mobile/CHANGELOG.md
draft: false
prerelease: true

Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/client-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Client App Image CI/CD
on:
workflow_dispatch:
workflow_call:
inputs:
semver:
required: true
type: string
push:
branches: [ "main" ]
paths: ["frontend", "nodeapp"]
pull_request:
branches: [ "main" ]
paths: ["frontend", "nodeapp"]

# concurrency:
# group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# cancel-in-progress: true

jobs:
push_to_registry:
name: 'Push Docker image to Docker Hub'
Expand All @@ -27,12 +27,20 @@ jobs:
cp -r frontend/static nodeapp/static
- name: 'Download main.js Artifact'
if: inputs.semver == '' # Only if workflow fired from frontend-build.yml
uses: dawidd6/action-download-artifact@v2
with:
workflow: frontend-build.yml
workflow_conclusion: success
name: web-main-js
path: nodeapp/static/frontend/

- name: 'Download main.js Artifact for a release'
if: inputs.semver != '' # Only if fired as job in release.yml
uses: actions/download-artifact@v3
with:
name: web-main-js
path: nodeapp/static/frontend/

- name: 'Log in to Docker Hub'
uses: docker/login-action@v2
Expand All @@ -50,7 +58,7 @@ jobs:
type=ref,event=tag
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest
- name: 'Get Commit Hash'
id: commit
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/coordinator-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Coodinator Image CI
on:
workflow_dispatch:
workflow_call:

# concurrency:
# group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# cancel-in-progress: true
inputs:
semver:
required: true
type: string

jobs:
push_to_registry:
Expand All @@ -16,13 +16,21 @@ jobs:
- uses: actions/checkout@v3

- name: 'Download main.js Artifact'
if: inputs.semver == '' # Only if workflow fired from frontend-build.yml
uses: dawidd6/action-download-artifact@v2
with:
workflow: frontend-build.yml
workflow_conclusion: success
name: web-main-js
path: frontend/static/frontend/

path: nodeapp/static/frontend/

- name: 'Download main.js Artifact for a release'
if: inputs.semver != '' # Only if fired as job in release.yml
uses: actions/download-artifact@v3
with:
name: web-main-js
path: nodeapp/static/frontend/

- name: 'Log in to Docker Hub'
uses: docker/login-action@v2
with:
Expand All @@ -39,7 +47,7 @@ jobs:
type=ref,event=tag
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest
- name: 'Get Commit Hash'
id: commit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
run: |
cd frontend
npm run build
- name: 'Archive Built Results'
- name: 'Archive Web Built Results'
uses: actions/upload-artifact@v3
with:
name: web-main-js
path: frontend/static/frontend/main.js
- name: 'Archive Built Results'
- name: 'Archive Mobile Built Results'
uses: actions/upload-artifact@v3
with:
name: mobile-main-js
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,24 @@ jobs:
uses: reckless-satoshi/robosats/.github/workflows/coordinator-image.yml@main
needs: [django-test, frontend-build]
secrets: inherit
with:
semver: ${{ needs.check-versions.outputs.semver }}

client-image:
uses: reckless-satoshi/robosats/.github/workflows/client-image.yml@main
needs: frontend-build
secrets: inherit
with:
semver: ${{ needs.check-versions.outputs.semver }}

android-build:
uses: reckless-satoshi/robosats/.github/workflows/coordinator-image.yml@main
needs: frontend-build
uses: reckless-satoshi/robosats/.github/workflows/android-build.yml@main
needs: [frontend-build, check-versions]
with:
semver: ${{ needs.check-versions.outputs.semver }}

release:
needs: [check-versions, coordinator-image, client-image] #, android-build]
needs: [check-versions, coordinator-image, client-image, android-build]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -78,12 +82,10 @@ jobs:
with:
body: ${{ steps.changelog.outputs.changelog }}

# Upload APK artifact
# Upload APK artifact asset
- name: 'Download APK Artifact'
uses: dawidd6/action-download-artifact@v2
uses: actions/download-artifact@v3
with:
workflow: android-build.yml
workflow_conclusion: success
name: robosats-${{ needs.check-versions.outputs.semver }}.apk
path: .
- name: 'Upload APK Asset'
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.2.0",
"version": "0.2.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
103 changes: 53 additions & 50 deletions frontend/src/components/BookTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const BookTable = ({
const verticalHeightFrame = 6.9075;
const verticalHeightRow = 3.25;
const defaultPageSize = Math.max(
Math.floor(((fullscreen? fullHeight *0.875:maxHeight) - verticalHeightFrame) / verticalHeightRow),
Math.floor(
((fullscreen ? fullHeight * 0.875 : maxHeight) - verticalHeightFrame) / verticalHeightRow,
),
1,
);
const height = defaultPageSize * verticalHeightRow + verticalHeightFrame;
Expand Down Expand Up @@ -577,7 +579,7 @@ const BookTable = ({
return [columns, width * 0.875 + 0.15];
};

const [columns, width] = filteredColumns(fullscreen? fullWidth : maxWidth);
const [columns, width] = filteredColumns(fullscreen ? fullWidth : maxWidth);

const gridComponents = {
NoResultsOverlay: () => (
Expand All @@ -586,65 +588,66 @@ const BookTable = ({
</Stack>
),
Footer: () => (
<Grid container alignItems="center" direction="row" justifyContent="space-between">
<Grid container alignItems='center' direction='row' justifyContent='space-between'>
<Grid item>
<IconButton onClick={() => setFullscreen(!fullscreen)}>
{fullscreen ? <FullscreenExitIcon/> : <FullscreenIcon/>}
</IconButton>
<IconButton onClick={() => setFullscreen(!fullscreen)}>
{fullscreen ? <FullscreenExitIcon /> : <FullscreenIcon />}
</IconButton>
</Grid>
<Grid item>
<GridPagination/>
<GridPagination />
</Grid>
</Grid>
),
}
};

if (!fullscreen){
return(
if (!fullscreen) {
return (
<Paper style={{ width: `${width}em`, height: `${height}em`, overflow: 'auto' }}>
<DataGrid
localeText={localeText}
rows={orders.filter(
(order) =>
(order.type == type || type == null) && (order.currency == currency || currency == 0),
)}
loading={loading}
columns={columns}
components={gridComponents}
pageSize={loading ? 0 : pageSize}
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
onPageSizeChange={(newPageSize) => {
setPageSize(newPageSize);
setUseDefaultPageSize(false);
}}
onRowClick={(params) => history.push('/order/' + params.row.id)} // Whole row is clickable, but the mouse only looks clickly in some places.
/>
localeText={localeText}
rows={orders.filter(
(order) =>
(order.type == type || type == null) && (order.currency == currency || currency == 0),
)}
loading={loading}
columns={columns}
components={gridComponents}
pageSize={loading ? 0 : pageSize}
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
onPageSizeChange={(newPageSize) => {
setPageSize(newPageSize);
setUseDefaultPageSize(false);
}}
onRowClick={(params) => history.push('/order/' + params.row.id)} // Whole row is clickable, but the mouse only looks clickly in some places.
/>
</Paper>
)
);
} else {
return(
<Dialog open={fullscreen} fullScreen={true}>
<Paper style={{ width: '100%', height: '100%', overflow: 'auto' }}>
<DataGrid
localeText={localeText}
rows={orders.filter(
(order) =>
(order.type == type || type == null) && (order.currency == currency || currency == 0),
)}
loading={loading}
columns={columns}
components={gridComponents}
pageSize={loading ? 0 : pageSize}
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
onPageSizeChange={(newPageSize) => {
setPageSize(newPageSize);
setUseDefaultPageSize(false);
}}
onRowClick={(params) => history.push('/order/' + params.row.id)} // Whole row is clickable, but the mouse only looks clickly in some places.
/>
</Paper>
</Dialog>
)
return (
<Dialog open={fullscreen} fullScreen={true}>
<Paper style={{ width: '100%', height: '100%', overflow: 'auto' }}>
<DataGrid
localeText={localeText}
rows={orders.filter(
(order) =>
(order.type == type || type == null) &&
(order.currency == currency || currency == 0),
)}
loading={loading}
columns={columns}
components={gridComponents}
pageSize={loading ? 0 : pageSize}
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
onPageSizeChange={(newPageSize) => {
setPageSize(newPageSize);
setUseDefaultPageSize(false);
}}
onRowClick={(params) => history.push('/order/' + params.row.id)} // Whole row is clickable, but the mouse only looks clickly in some places.
/>
</Paper>
</Dialog>
);
}
};

Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"major":0,
"minor":2,
"patch":0
"patch":1
}

0 comments on commit a6cbff8

Please sign in to comment.