Skip to content

2.1.6-beta.3

2.1.6-beta.3 #718

Workflow file for this run

name: Release Build
on:
# The "upload" step has further name-based conditions
push:
branches:
- "release/**"
env:
# Creates and uploads sourcemaps to Application error telemetry, and save the built extension as an artifact
PUBLIC_RELEASE: true
CHROME_MANIFEST_KEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhYpgz6Nt3vv5n3d8jyrsWXjkvAxh7bz8WJW05RFrtJx9t0BiVVclO+WpAmhKanB2BiTDw4+Dnlf2lQfTo62LIBnkfTiGzukKqTu3plF0D/Tl/yG1st1xKaQ6dekeThcsgxrFD8+kIUwF4Vq0wPpQ5upl+vf6kX4t9eDev8Eg86mHzUEG/QoS/bu5evN3I1Z0HsiF84VWlrV0b/1GSqpn+dMrFFdcwo2Sn0Ec65nSNfzauDUm5n0NToQ8iYdHkuottREXKJ7/Uy4tO0eMmfokVixbm0i2m9aHEOior5CmNG9X/yGtR2CiM1N4DSEY5mTFu5hPOrALspJ+t7+Is7YnFwIDAQAB
jobs:
build:
runs-on: ubuntu-latest
env:
SOURCE_MAP_URL_BASE: https://pixiebrix-extension-source-maps.s3.amazonaws.com
SOURCE_MAP_PATH: sourcemaps/${{ github.job }}/${{ github.sha }}/mv3
# Docs https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
strategy:
fail-fast: false
name: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run build
env:
MV: 3
RELEASE_CHANNEL: stable
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
- run: bash scripts/upload-sourcemaps.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SOURCEMAP_USER_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SOURCEMAP_USER_KEY }}
AWS_DEFAULT_REGION: "us-east-2"
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
- name: Delete local sourcemaps
run: find dist -name '*.map' -delete
- name: Save store extension
uses: actions/upload-artifact@v4
with:
name: build-for-store
path: dist
retention-days: 30
if-no-files-found: error
- name: Create production version
run: npx [email protected] dist/manifest.json key '${{ env.CHROME_MANIFEST_KEY }}'
- name: Save production extension
uses: actions/upload-artifact@v4
with:
name: build-production
path: dist
retention-days: 30
if-no-files-found: error
upload:
# https://github.com/fregante/chrome-webstore-upload-keys
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build-for-store
- name: Upload to Chrome Web Store (without publishing)
run: npx chrome-webstore-upload-cli@3 upload
env:
EXTENSION_ID: mpjjildhmpddojocokjkgmlkkkfjnepo
CLIENT_ID: ${{ secrets.WEBSTORE_UPLOAD_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.WEBSTORE_UPLOAD_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.WEBSTORE_UPLOAD_REFRESH_TOKEN }}
notify:
needs: build
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: release-notifications
SLACK_MESSAGE: "Chrome release build succeeded :rocket:"