Skip to content

chore(@cryptkeeperzk/app): release version 0.2.1 #5

chore(@cryptkeeperzk/app): release version 0.2.1

chore(@cryptkeeperzk/app): release version 0.2.1 #5

Workflow file for this run

name: Publish chrome extension
on:
push:
tags:
- "@cryptkeeperzk/app-*"
env:
CRYPTKEEPER_DEBUG: false
INTERREP_IDENTITY: false
USER_MNEMONIC: false
E2E: false
METAMASK_EXTENSION_ID: "nkbihfbeogaeaoehlefnkodbefgpgknn"
METAMASK_VERSION: "10.28.1"
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
FREIGHT_TRUST_NETWORK: ${{ secrets.FREIGHT_TRUST_NETWORK }}
PULSECHAIN_API_KEY: ${{ secrets.PULSECHAIN_API_KEY }}
TARGET: "chrome"
DEMO_URL: ${{ vars.DEMO_URL }}
EXTENSION_VERSION: ""
MANIFEST_VERSION: 3
VERIFIABLE_CREDENTIALS: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-chrome-extension:
strategy:
fail-fast: false
matrix:
node-version: [18]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: |-
pnpm install --frozen-lockfile --prefer-offline
pnpm install -g chrome-webstore-upload-cli
- name: Get extension version
run: |-
echo "EXTENSION_VERSION=$(node -e "console.log(require('./packages/app/package.json').version)")" >> $GITHUB_ENV
- name: Build chrome artifact
env:
TARGET: "chrome"
MANIFEST_VERSION: 3
run: |-
pnpm run build
zip -r cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip ./packages/app/dist
- name: Sign build
run: |-
export GPG_TTY=`tty`
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --passphrase "$GPG_SIGNING_KEY_PASSPHRASE" --batch --pinentry-mode loopback --import
gpg --passphrase $GPG_SIGNING_KEY_PASSPHRASE --batch --pinentry-mode loopback --detach-sign --armor cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip
echo $(shasum cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip | awk '{ print $1 }') >> cryptkeeper-chrome-extension-checksum-v${{ env.EXTENSION_VERSION }}.txt
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_KEY_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }}
- name: Upload artifact to chrome store
run: |-
chrome-webstore-upload upload --source cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip --extension-id ${{ vars.CHROME_EXTENSION_ID }} --client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} --client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} --refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}
- name: Upload build
run: |-
gh release upload "${{ github.ref_name }}" "cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip" "cryptkeeper-chrome-extension-checksum-v${{ env.EXTENSION_VERSION }}.txt" "cryptkeeper-chrome-extension-v${{ env.EXTENSION_VERSION }}.zip.asc"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}