Skip to content

chore: pick commits #30122

chore: pick commits

chore: pick commits #30122

Workflow file for this run

name: Compile
on:
push:
tags: ["v*"]
branches: [master, develop, released, hotfix/*, release/*]
pull_request:
branches: [master, develop, released, hotfix/*, release/*]
merge_group:
types: [checks_requested]
permissions:
contents: write
pull-requests: read
packages: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
WEB3_CONSTANTS_RPC: ${{ secrets.WEB3_CONSTANTS_RPC }}
MASK_SENTRY_DSN: ${{ secrets.MASK_SENTRY_DSN }}
steps:
- name: Get cache date
id: get-date
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash
# note: required by sentry
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
# Keep consistent between node version in the .node-version file and below.
node-version: "20"
cache: 'pnpm'
- name: Authenticate NPM
uses: DimensionDev/github-token-action@latest
with:
registry: true
- name: Restore Webpack cache
uses: actions/cache@v3
with:
path: packages/mask/node_modules/.cache/
key: extension-${{ hashFiles('pnpm-lock.yaml') }}-${{ steps.get-date.outputs.date }}
restore-keys: |
extension-${{ hashFiles('pnpm-lock.yaml') }}
extension-
- run: git config --global url."https://github.com/".insteadOf [email protected]
- run: pnpm install
- run: npx gulp build-ci
- name: Create Sentry release
uses: getsentry/action-release@v1
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/released'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: mask-network
SENTRY_PROJECT: mask-network
with:
environment: production
sourcemaps: ./build
version_prefix: mask-
ignore_missing: true
- name: Upload `MaskNetwork.chromium.zip`
uses: actions/upload-artifact@v3
with:
name: MaskNetwork.chromium.zip
path: masknetwork.chromium.zip
if-no-files-found: error
- name: Upload `MaskNetwork.chromium-beta.zip`
uses: actions/upload-artifact@v3
with:
name: MaskNetwork.chromium-beta.zip
path: masknetwork.chromium-beta.zip
if-no-files-found: error
- name: Upload `MaskNetwork.chromium-mv3.zip`
uses: actions/upload-artifact@v3
with:
name: MaskNetwork.chromium-mv3.zip
path: masknetwork.chromium-mv3.zip
if-no-files-found: error
- name: Upload `MaskNetwork.firefox.zip`
uses: actions/upload-artifact@v3
with:
name: MaskNetwork.firefox.zip
path: masknetwork.firefox.zip
if-no-files-found: error
- name: Upload `MaskNetwork.firefox-mv3.zip`
uses: actions/upload-artifact@v3
with:
name: MaskNetwork.firefox-mv3.zip
path: masknetwork.firefox-mv3.zip
if-no-files-found: error
- uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/v')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.zip