From d9b05ba5018d1e3b6e267099a46198f63c25fbc9 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 23 Nov 2022 13:37:39 +0800 Subject: [PATCH 1/4] fix date prefix for prod builds --- .github/workflows/ci.yml | 10 +++++++++- .github/workflows/main.yml | 2 +- packages/gui/src/app.css | 16 ++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cbad7f..da656ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,15 @@ jobs: toolchain: stable - name: install app dependencies and build it run: pnpm install && pnpm --filter gui build - + - name: Get current date + id: date + run: echo "date=date::$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT + - uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - run: echo ${{ steps.date.outputs.date }}_test build_tauri: needs: changes if: needs.changes.outputs.tauri == 'true' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe86c55..87f2ede 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,7 +104,7 @@ jobs: - name: Get current date id: date - run: echo "date=date::$(date +'%Y-%m-%dT%H:%M:%S')" >> >> $GITHUB_OUTPUT + run: echo "date=date::$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT - name: mac-os cp package images from prod to gui bucket if: matrix.platform == 'macos-latest' diff --git a/packages/gui/src/app.css b/packages/gui/src/app.css index aabc518..a529a89 100644 --- a/packages/gui/src/app.css +++ b/packages/gui/src/app.css @@ -8,17 +8,17 @@ html { } @font-face { - font-family: "pp-neue-machina"; - src: url("../static/fonts/PPNeueMachina-InktrapLight.woff"); + font-family: "pp-neue-machina"; + src: url("../static/fonts/PPNeueMachina-InktrapLight.woff"); } @font-face { - font-family: "sono"; - src: url("../static/fonts/Sono-Light.woff2"); + font-family: "sono"; + src: url("../static/fonts/Sono-Light.woff2"); } @layer base { - html { - font-family: sono, sans-serif; - } - } \ No newline at end of file + html { + font-family: sono, sans-serif; + } +} \ No newline at end of file From 87de095431fe8802f8ef653056ce3ce30ec26883 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 23 Nov 2022 13:42:28 +0800 Subject: [PATCH 2/4] change date fix to unix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da656ce..aa03755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: run: pnpm install && pnpm --filter gui build - name: Get current date id: date - run: echo "date=date::$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT + run: echo "date=$(date +'%s')" >> $GITHUB_OUTPUT - uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} From a9d723d7860b2648022ef9c000bd8f62a7941e3e Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 23 Nov 2022 13:48:08 +0800 Subject: [PATCH 3/4] apply unix ts prefix --- .github/workflows/ci.yml | 4 ---- .github/workflows/main.yml | 8 ++++---- packages/gui/src-tauri/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa03755..7ad309d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,15 +46,11 @@ jobs: toolchain: stable - name: install app dependencies and build it run: pnpm install && pnpm --filter gui build - - name: Get current date - id: date - run: echo "date=$(date +'%s')" >> $GITHUB_OUTPUT - uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - run: echo ${{ steps.date.outputs.date }}_test build_tauri: needs: changes if: needs.changes.outputs.tauri == 'true' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 87f2ede..d426b62 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,18 +102,18 @@ jobs: - name: test build tauri run: pnpm --filter gui tauri build - - name: Get current date + - name: Get current unix ts - seconds id: date - run: echo "date=date::$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT + run: echo "unix_seconds=$(date +'%s')" >> $GITHUB_OUTPUT - name: mac-os cp package images from prod to gui bucket if: matrix.platform == 'macos-latest' run: | aws s3 cp ./packages/gui/src-tauri/target/release/bundle/dmg/gui_0.1.0_x64.dmg \ - s3://preview.gui.tea.xyz/release/gui_${{ steps.date.outputs.date }}.dmg + s3://preview.gui.tea.xyz/release/gui_${{ steps.date.outputs.unix_seconds }}.dmg - name: ubuntu cp package images from prod to gui bucket if: matrix.platform == 'ubuntu-latest' run: | aws s3 cp ./packages/gui/src-tauri/target/release/bundle/deb/gui_0.1.0_amd64.deb \ - s3://preview.gui.tea.xyz/release/gui_${{ steps.date.outputs.date }}.deb \ No newline at end of file + s3://preview.gui.tea.xyz/release/gui_${{ steps.date.outputs.unix_seconds }}.deb \ No newline at end of file diff --git a/packages/gui/src-tauri/Cargo.toml b/packages/gui/src-tauri/Cargo.toml index de06055..c236fde 100644 --- a/packages/gui/src-tauri/Cargo.toml +++ b/packages/gui/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "app" version = "0.1.0" -description = "A Tauri App" +description = "A tea.xyz app" authors = ["you"] license = "" repository = "" From ee6ef6e1792a362e7f64a309c61aaacda77e1e74 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 23 Nov 2022 13:55:11 +0800 Subject: [PATCH 4/4] add more keys to cargo caching --- .github/workflows/ci.yml | 1 + .github/workflows/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ad309d..152395b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,7 @@ jobs: # The prefix cache key, this can be changed to start a new cache manually. # default: "v0-rust" prefix-key: ${{ matrix.platform }} + shared-key: ci cache-targets: false - name: install app dependencies run: pnpm install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d426b62..0b2ecea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,6 +81,7 @@ jobs: # The prefix cache key, this can be changed to start a new cache manually. # default: "v0-rust" prefix-key: ${{ matrix.platform }} + shared-key: prod cache-targets: false - name: install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-latest'