chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: Build Extension
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'packages/extension/**'
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Get package info
|
||||
id: package
|
||||
run: |
|
||||
echo "name=$(node -p "require('./packages/extension/package.json').name")" >> $GITHUB_OUTPUT
|
||||
echo "version=$(node -p "require('./packages/extension/package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build extensions
|
||||
run: |
|
||||
pnpm build
|
||||
cd packages/extension
|
||||
rm -rf build
|
||||
pnpm pack:all
|
||||
|
||||
- name: Commit changes
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git checkout main
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add -f packages/extension/build/*.zip
|
||||
git diff --staged --quiet || (git commit -m "chore: update extension builds [skip ci]" && git push)
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Publish Any Commit
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile --strict-peer-dependencies=false
|
||||
|
||||
- name: Install react-doctor
|
||||
run: pnpm --filter react-scan exec react-doctor --check
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd packages/scan
|
||||
NODE_ENV=production pnpm build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
|
||||
- name: Publish NPM Package to pkg-pr-new
|
||||
run: pnpx pkg-pr-new publish ./packages/scan
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user