fix: cert import #159
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: Assemble Weapp Release | |
# 触发工作流程的事件 | |
on: | |
push: | |
tags: [ v*, w* ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
# 工作流环境变量 | |
env: | |
# 小程序的appid | |
WEAPP_ID: ${{ secrets.WEAPP_ID }} | |
# 小程序的秘钥 | |
WEAPP_KEY: ${{ secrets.WEAPP_KEY }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache node_modules Folder | |
uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-node_modules | |
restore-keys: ${{ runner.os }}-node_modules | |
- name: Get Yarn Cache Directory Path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache Yarn | |
uses: actions/cache@v2 | |
env: | |
cache-name: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: | | |
yarn | |
- name: Import Weapp Key | |
run: echo "$WEAPP_KEY" | base64 --decode > key/private.appid.key | |
env: | |
WEAPP_KEY: ${{ env.WEAPP_KEY }} | |
- name: Build Taro Playground Weapp | |
run: | | |
yarn build:weapp -- --upload | |
env: | |
WEAPP_ID: ${{ env.WEAPP_ID }} |