Skip to content

Merge pull request #316 from blocklet/master #72

Merge pull request #316 from blocklet/master

Merge pull request #316 from blocklet/master #72

name: "Upload To Prod Store"
env:
NODE_OPTIONS: "--max_old_space_size=6144"
on:
workflow_dispatch:
push:
branches:
- release
jobs:
check-version:
name: Check version by local workflow
uses: ./.github/workflows/version-check.yml
upload:
if: "!contains(toJSON(github.event.commits.*.message) , '[skip ci]')"
name: Upload to prod store
needs: check-version
runs-on: ubuntu-latest
strategy:
matrix:
dir: ${{ fromJSON(needs.check-version.outputs.folders) }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
- run: npm add -g @antfu/ni
- run: nci
- name: Prepare @blocklet/cli deps
run: yarn global add @blocklet/cli@beta
shell: bash
- name: Prebuild deps
if: "contains(matrix.dir , 'blocklets/')"
run: pnpm -r prebuild:dep
- name: Upload to prod store
uses: blocklet/action-workflow@v1
if: "contains(matrix.dir , 'blocklets/')"
env:
COMPONENT_STORE_URL: ${{ secrets.STORE_ENDPOINT_PROD }}
with:
skip-deps: true
skip-upload: false
skip-deploy: true
skip-release: true
bundle-command: pnpm run bundle
working-directory: ${{ matrix.dir }}
store-endpoint: ${{ secrets.STORE_ENDPOINT_PROD }}
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN_PROD }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}