From 5dd845835f1fe46482bb6d427f271e1f7d748c6f Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 10:31:52 +0100 Subject: [PATCH 1/6] Test publish flow --- .github/workflows/test-release.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test-release.yml diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml new file mode 100644 index 0000000000..9d98ade807 --- /dev/null +++ b/.github/workflows/test-release.yml @@ -0,0 +1,47 @@ +# Publishes extension to chrome web store when a release is made in github. + +# `maniftest.json` should already be updated to the desired version before release. +# make sure download-proving-keys contains the correct version tag. + +# https://chrome.google.com/webstore/detail/penumbra-wallet/lkpmkhpnhknhmibgnmmhdhgdilepfghe +name: Test Publish flow + +# Temp for testing +on: + workflow_call: + workflow_dispatch: + pull_request: + +jobs: + turbo-compile: + name: Compile + uses: ./.github/workflows/compile-wasm.yml + + publish: + environment: ext-publish + runs-on: buildjet-16vcpu-ubuntu-2204 + needs: turbo-compile + + steps: + - uses: actions/checkout@v4 + - uses: buildjet/cache@v3 + with: + path: .turbo + restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled + - uses: pnpm/action-setup@v2 + - uses: buildjet/setup-node@v4 + with: + node-version: '21' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + - uses: jetli/wasm-pack-action@v0.4.0 # preinstall wasm-pack + with: + version: 'latest' + - run: pnpm turbo telemetry disable + - run: pnpm turbo download-keys --force --cache-dir=.turbo + - run: pnpm turbo build --cache-dir=.turbo + - name: Package up extension + run: zip -r dist.zip apps/extension/dist From 8842e56372ae498d420ba27acafa9ce47cf48c97 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 10:39:06 +0100 Subject: [PATCH 2/6] mimic turbo.ci --- .github/workflows/test-release.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 9d98ade807..7d46999302 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -18,15 +18,17 @@ jobs: uses: ./.github/workflows/compile-wasm.yml publish: - environment: ext-publish + name: Publish extension runs-on: buildjet-16vcpu-ubuntu-2204 needs: turbo-compile steps: - uses: actions/checkout@v4 - - uses: buildjet/cache@v3 + - id: ext:publish + uses: buildjet/cache@v3 with: path: .turbo + key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-ext:publish restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled - uses: pnpm/action-setup@v2 - uses: buildjet/setup-node@v4 @@ -34,14 +36,8 @@ jobs: node-version: '21' cache: 'pnpm' - run: pnpm install --frozen-lockfile - - uses: dtolnay/rust-toolchain@stable - with: - targets: wasm32-unknown-unknown - - uses: jetli/wasm-pack-action@v0.4.0 # preinstall wasm-pack - with: - version: 'latest' - run: pnpm turbo telemetry disable - - run: pnpm turbo download-keys --force --cache-dir=.turbo - run: pnpm turbo build --cache-dir=.turbo + - name: Package up extension run: zip -r dist.zip apps/extension/dist From 4d69a7961f9fc46896529cdcba1e5c9a002a2957 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 10:49:11 +0100 Subject: [PATCH 3/6] try 3 --- .github/workflows/test-release.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 7d46999302..bb2db7b9dd 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -1,9 +1,3 @@ -# Publishes extension to chrome web store when a release is made in github. - -# `maniftest.json` should already be updated to the desired version before release. -# make sure download-proving-keys contains the correct version tag. - -# https://chrome.google.com/webstore/detail/penumbra-wallet/lkpmkhpnhknhmibgnmmhdhgdilepfghe name: Test Publish flow # Temp for testing @@ -11,6 +5,9 @@ on: workflow_call: workflow_dispatch: pull_request: + push: + branches: + - main jobs: turbo-compile: @@ -18,17 +15,16 @@ jobs: uses: ./.github/workflows/compile-wasm.yml publish: - name: Publish extension - runs-on: buildjet-16vcpu-ubuntu-2204 + name: Build + runs-on: buildjet-2vcpu-ubuntu-2204 needs: turbo-compile - steps: - uses: actions/checkout@v4 - - id: ext:publish + - id: built uses: buildjet/cache@v3 with: path: .turbo - key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-ext:publish + key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled - uses: pnpm/action-setup@v2 - uses: buildjet/setup-node@v4 From 25771f76ba5347082bd4001ec3a611572182fdbb Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 10:50:38 +0100 Subject: [PATCH 4/6] concurrency --- .github/workflows/test-release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index bb2db7b9dd..8ed21b1f0e 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -1,5 +1,9 @@ name: Test Publish flow +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + # Temp for testing on: workflow_call: From 8be53150c3673ae40636dc828e62e8695822dcfd Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 10:56:23 +0100 Subject: [PATCH 5/6] modify original --- .github/workflows/extension-publish.yml | 36 ++++++++++++--------- .github/workflows/test-release.yml | 43 ------------------------- 2 files changed, 21 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/test-release.yml diff --git a/.github/workflows/extension-publish.yml b/.github/workflows/extension-publish.yml index f8ecd8f98b..4f0389fbda 100644 --- a/.github/workflows/extension-publish.yml +++ b/.github/workflows/extension-publish.yml @@ -12,21 +12,26 @@ on: - '*-?v[0-9]+*' workflow_call: workflow_dispatch: +# Temp remove + pull_request: jobs: - compile: + turbo-compile: + name: Compile uses: ./.github/workflows/compile-wasm.yml publish: - environment: ext-publish - runs-on: buildjet-16vcpu-ubuntu-2204 - needs: compile - +# environment: ext-publish + name: Publish extension + runs-on: buildjet-4vcpu-ubuntu-2204 + needs: turbo-compile steps: - uses: actions/checkout@v4 - - uses: buildjet/cache@v3 + - id: built + uses: buildjet/cache@v3 with: path: .turbo + key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled - uses: pnpm/action-setup@v2 - uses: buildjet/setup-node@v4 @@ -35,15 +40,16 @@ jobs: cache: 'pnpm' - run: pnpm install --frozen-lockfile - run: pnpm turbo telemetry disable - - run: pnpm turbo download-keys --force --cache-dir=.turbo - run: pnpm turbo build --cache-dir=.turbo + - name: Package up extension run: zip -r dist.zip apps/extension/dist - - name: Upload & release - uses: penumbra-zone/chrome-extension-upload@v1 - with: - file-path: dist.zip - extension-id: lkpmkhpnhknhmibgnmmhdhgdilepfghe - client-id: ${{ secrets.GOOGLE_CLIENT_ID }} - client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }} - refresh-token: ${{ secrets.GOOGLE_REFRESH_TOKEN }} +# +# - name: Upload & release +# uses: penumbra-zone/chrome-extension-upload@v1 +# with: +# file-path: dist.zip +# extension-id: lkpmkhpnhknhmibgnmmhdhgdilepfghe +# client-id: ${{ secrets.GOOGLE_CLIENT_ID }} +# client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }} +# refresh-token: ${{ secrets.GOOGLE_REFRESH_TOKEN }} diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml deleted file mode 100644 index 8ed21b1f0e..0000000000 --- a/.github/workflows/test-release.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Test Publish flow - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -# Temp for testing -on: - workflow_call: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - turbo-compile: - name: Compile - uses: ./.github/workflows/compile-wasm.yml - - publish: - name: Build - runs-on: buildjet-2vcpu-ubuntu-2204 - needs: turbo-compile - steps: - - uses: actions/checkout@v4 - - id: built - uses: buildjet/cache@v3 - with: - path: .turbo - key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built - restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled - - uses: pnpm/action-setup@v2 - - uses: buildjet/setup-node@v4 - with: - node-version: '21' - cache: 'pnpm' - - run: pnpm install --frozen-lockfile - - run: pnpm turbo telemetry disable - - run: pnpm turbo build --cache-dir=.turbo - - - name: Package up extension - run: zip -r dist.zip apps/extension/dist From c1a8dc4250dcae61bd3f1f241d5eaf55ce34d391 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Mar 2024 11:06:06 +0100 Subject: [PATCH 6/6] rdy --- .github/workflows/extension-publish.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/extension-publish.yml b/.github/workflows/extension-publish.yml index 4f0389fbda..9a261d8174 100644 --- a/.github/workflows/extension-publish.yml +++ b/.github/workflows/extension-publish.yml @@ -12,8 +12,6 @@ on: - '*-?v[0-9]+*' workflow_call: workflow_dispatch: -# Temp remove - pull_request: jobs: turbo-compile: @@ -21,10 +19,11 @@ jobs: uses: ./.github/workflows/compile-wasm.yml publish: -# environment: ext-publish + environment: ext-publish name: Publish extension runs-on: buildjet-4vcpu-ubuntu-2204 needs: turbo-compile + steps: - uses: actions/checkout@v4 - id: built @@ -44,12 +43,12 @@ jobs: - name: Package up extension run: zip -r dist.zip apps/extension/dist -# -# - name: Upload & release -# uses: penumbra-zone/chrome-extension-upload@v1 -# with: -# file-path: dist.zip -# extension-id: lkpmkhpnhknhmibgnmmhdhgdilepfghe -# client-id: ${{ secrets.GOOGLE_CLIENT_ID }} -# client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }} -# refresh-token: ${{ secrets.GOOGLE_REFRESH_TOKEN }} + + - name: Upload & release + uses: penumbra-zone/chrome-extension-upload@v1 + with: + file-path: dist.zip + extension-id: lkpmkhpnhknhmibgnmmhdhgdilepfghe + client-id: ${{ secrets.GOOGLE_CLIENT_ID }} + client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }} + refresh-token: ${{ secrets.GOOGLE_REFRESH_TOKEN }}