Skip to content

⬆️ upgrade type-fest to v4.30.2 (#172) #174

⬆️ upgrade type-fest to v4.30.2 (#172)

⬆️ upgrade type-fest to v4.30.2 (#172) #174

Workflow file for this run

name: Publish
on:
push:
branches:
- master
jobs:
build-chrome-extension:
name: Build Chrome extension artifact
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- name: Install Dependencies
run: yarn
- name: Build
run: yarn build
- name: Set Version
id: set-version
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
- name: Archive chrome-extension artifact
uses: actions/upload-artifact@v4
with:
name: kartrak-${{ steps.set-version.outputs.VERSION }}
path: ./zip/kartrak-${{ steps.set-version.outputs.VERSION }}.zip
upload-extension:
name: Upload extension
runs-on: ubuntu-latest
needs: build-chrome-extension
env:
EXTENSION_ID: bheoaeahkgfmogmgkfldoecmnlbhlibf
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- name: Install Dependencies
run: yarn
- name: Build
run: yarn build
- name: Set Version
id: set-version
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
- name: Download bundle artifact
uses: actions/download-artifact@v4
with:
name: kartrak-${{ steps.set-version.outputs.VERSION }}
- name: Upload to Chrome Web Store
run: |-
set +e
yarn run chrome-webstore-upload upload --source ./zip/kartrak-${{ steps.set-version.outputs.VERSION }}.zip --extension-id ${{ env.EXTENSION_ID }} --client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} --client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} --refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}
exit_code=$?
set -e
if [ $exit_code -ne 0 ]; then
echo "Error: ITEM_NOT_UPDATABLE. Cancelling workflow."
echo "workflow_cancelled=true" >> $GITHUB_OUTPUT
fi