From debbc7e6fee4d2034573024c89beca0f0a1d6ccf Mon Sep 17 00:00:00 2001 From: Kieran O'Neill Date: Tue, 21 Nov 2023 13:38:02 +0200 Subject: [PATCH] fix: manifest version not being updated (#25) * fix: update manifest to correct extension version * build: script correctly updates manifest version to extension version * ci: change release workflow to build and package after release is published --- .github/workflows/release.yml | 89 ++-------------------------------- .releaserc | 3 +- bin/update_manifest_version.sh | 2 +- src/manifest.common.json | 2 +- 4 files changed, 8 insertions(+), 88 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f813756e..bf4011e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,87 +20,23 @@ jobs: - name: "🔧 Setup" uses: ./.github/actions/use-dependencies - ## - # package - ## - - build_chrome: - name: "Build Chrome" - needs: install - runs-on: ubuntu-latest - steps: - - name: "🛎 Checkout" - uses: actions/checkout@v3 - - name: "🔧 Setup" - uses: ./.github/actions/use-dependencies - - name: "📝 Create .env file" - uses: ./.github/actions/create-env-file - with: - walletconnect_project_id: ${{ secrets.PRODUCTION_WALLETCONNECT_PROJECT_ID }} - - name: "🏗️ Build" - run: yarn build:chrome - - name: "🗜️ Zip build" - run: zip -qr chrome_build.zip .chrome_build/ - - name: "📤 Upload build" - uses: actions/upload-artifact@v3 - with: - name: chrome_build - path: chrome_build.zip - - build_firefox: - name: "Build Firefox" - needs: install - runs-on: ubuntu-latest - steps: - - name: "🛎 Checkout" - uses: actions/checkout@v3 - - name: "🔧 Setup" - uses: ./.github/actions/use-dependencies - - name: "📝 Create .env file" - uses: ./.github/actions/create-env-file - with: - walletconnect_project_id: ${{ secrets.PRODUCTION_WALLETCONNECT_PROJECT_ID }} - - name: "🏗️ Build" - run: yarn build:firefox - - name: "🗜️ Zip build" - run: zip -qr firefox_build.zip .firefox_build/ - - name: "📤 Upload build" - uses: actions/upload-artifact@v3 - with: - name: firefox_build - path: firefox_build.zip - ## # release ## release: name: "Release" - needs: [install, build_chrome, build_firefox] + needs: [install] runs-on: ubuntu-latest steps: - name: "🛎 Checkout" uses: actions/checkout@v3 - name: "🔧 Setup" uses: ./.github/actions/use-dependencies - # download & package chrome build - - name: "📥 Download Chrome build" - uses: actions/download-artifact@v3 - with: - name: chrome_build - - name: "🗜️ Unzip Chrome build" - run: unzip -q chrome_build.zip - - name: "📦 Package Chrome build" - run: yarn package:chrome - # download & package firefox build - - name: "📥 Download Firefox build" - uses: actions/download-artifact@v3 + - name: "📝 Create .env file" + uses: ./.github/actions/create-env-file with: - name: firefox_build - - name: "🗜️ Unzip Firefox build" - run: unzip -q firefox_build.zip - - name: "📦 Package Firefox build" - run: yarn package:firefox + walletconnect_project_id: ${{ secrets.PRODUCTION_WALLETCONNECT_PROJECT_ID }} - name: "🔖 Release" env: # appears on the release commits @@ -111,20 +47,3 @@ jobs: # used to push the release commit and create the tags GITHUB_TOKEN: ${{ secrets.WRITE_REPOS_TOKEN }} run: yarn semantic-release - - ## - # clean up - ## - - clean_up: - name: "Clean Up" - needs: release - runs-on: ubuntu-latest - steps: - - name: "🗑️ Delete artifacts" - uses: geekyeggo/delete-artifact@v2 - with: - failOnError: false - name: | - chrome_build - firefox_build diff --git a/.releaserc b/.releaserc index 2d9e2ec7..611a6356 100644 --- a/.releaserc +++ b/.releaserc @@ -8,7 +8,8 @@ [ "@semantic-release/exec", { - "prepareCmd": "./bin/update_manifest_version.sh ${nextRelease.version}" + "prepareCmd": "./bin/update_manifest_version.sh ${nextRelease.version}", + "publishCmd": "yarn concurrently \"yarn build:chrome && yarn package:chrome\" \"yarn build:firefox && yarn package:firefox\"" } ], [ diff --git a/bin/update_manifest_version.sh b/bin/update_manifest_version.sh index 713788a3..8a8a0de5 100755 --- a/bin/update_manifest_version.sh +++ b/bin/update_manifest_version.sh @@ -28,7 +28,7 @@ function main { fi printf "%b updating manifest.common.json#version to version '%s' \n" "${INFO_PREFIX}" "${1}" - cat <<< $(jq --arg version "${1}" '.version = $version' src/manifest.common.json) > manifest.common.json + cat <<< $(jq --arg version "${1}" '.version = $version' "${PWD}/src/manifest.common.json") > "${PWD}/src/manifest.common.json" exit 0 } diff --git a/src/manifest.common.json b/src/manifest.common.json index cae3fdbc..f194010a 100644 --- a/src/manifest.common.json +++ b/src/manifest.common.json @@ -1,6 +1,6 @@ { "name": "Kibisis", - "version": "1.2.0", + "version": "1.3.0", "description": "An AVM wallet in your browser that goes beyond just DeFi.", "author": "Agora Labs", "icons": {