Release @argent-x/[email protected] #138
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- release/* | |
tags: | |
- "**" | |
jobs: | |
build: | |
environment: "prod" | |
env: | |
FEATURE_PRIVACY_SETTINGS: "true" | |
FEATURE_EXPERIMENTAL_SETTINGS: "false" | |
FEATURE_BETA_FEATURES: "false" | |
FEATURE_BANXA: "true" | |
FEATURE_LAYERSWAP: "true" | |
FEATURE_ORBITER: "true" | |
FEATURE_VERIFIED_DAPPS: "true" | |
ARGENT_SHIELD_NETWORK_ID: "mainnet-alpha" | |
FEATURE_MULTISIG: "true" | |
FEATURE_ACTIVITY_V2: "true" | |
SENTRY_ENVIRONMENT: "production" | |
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
RAMP_API_KEY: ${{ secrets.RAMP_API_KEY }} | |
TOPPER_PEM_KEY: ${{ secrets.TOPPER_PEM_KEY }} | |
FILENAME: argent-extension | |
SAFE_ENV_VARS: true | |
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }} | |
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }} | |
ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }} | |
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }} | |
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }} | |
ARGENT_X_ENVIRONMENT: "prod" | |
MULTICALL_MAX_BATCH_SIZE: 20 | |
# Refresh intervals | |
REFRESH_INTERVAL_FAST: 20 | |
REFRESH_INTERVAL_MEDIUM: 60 | |
REFRESH_INTERVAL_SLOW: 300 | |
REFRESH_INTERVAL_VERY_SLOW: 86400 | |
NEW_CAIRO_0_ENABLED: false | |
if: ${{ !startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'extension') }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
cache: "pnpm" | |
- run: pnpm run setup | |
- name: Build Chrome version | |
run: pnpm build | |
- name: Check bundlesize for chrome | |
run: pnpm bundlewatch | |
- name: Create chrome zip | |
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-chrome.zip" .) | |
- name: Build Firefox version | |
run: MANIFEST_VERSION=v2 pnpm --filter @argent-x/extension build | |
- name: Create firefox zip | |
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-firefox.zip" .) | |
- name: Check bundlesize for firefox | |
run: pnpm bundlewatch | |
- name: Upload artifacts for chrome | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chrome | |
path: "*-chrome.zip" | |
retention-days: 14 | |
if-no-files-found: error | |
- name: Upload artifacts for firefox | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firefox | |
path: "*-firefox.zip" | |
retention-days: 14 | |
if-no-files-found: error | |
- name: Get Extension version | |
id: package-version | |
run: | | |
PACKAGE_VERSION=$(cat ./packages/extension/package.json | jq -r '.version') | |
echo "current-version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT | |
- name: Check sourcemaps | |
run: | | |
ls -l ./packages/extension | |
if [ ! -d "./packages/extension/sourcemaps" ]; then | |
echo "No sourcemaps found" | |
exit 1 | |
fi | |
- name: Create Sentry release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
SENTRY_LOG_LEVEL: debug | |
with: | |
environment: ${{ env.SENTRY_ENVIRONMENT }} | |
sourcemaps: "./packages/extension/dist ./packages/extension/sourcemaps" | |
url_prefix: "~/" | |
version: ${{ steps.package-version.outputs.current-version }} | |
ignore_missing: true | |
- name: Get product version | |
id: product-version | |
run: | | |
PRODUCT_VERSION=$(cat ./packages/extension/dist/manifest.json | jq -r '.version') | |
echo "current-version=${PRODUCT_VERSION}" >> $GITHUB_OUTPUT | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
name: extension@${{ steps.product-version.outputs.current-version }} | |
files: | | |
${{ env.FILENAME }}-chrome.zip | |
${{ env.FILENAME }}-firefox.zip |