# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: WX CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: generate config
run: \cp -rf config.example.js config.js
&& sed -i 's|YOUR_PUBLIC_RSA_KEY|${{ secrets.CONFIG_PUBLIC_RSA_KEY }}|' config.js
&& sed -i 's/YOUR_CDN_SALT/${{ secrets.CONFIG_CDN_SALT }}/' config.js
&& sed -i 's/YOUR_QUERY_SALT/${{ secrets.CONFIG_QUERY_SALT }}/' config.js
- name: install Dependencies
run: npm i
# - name: build weapp
# run: npm run build:weapp
# see Project/Settings/Secrets
- name: generate pkp
run: echo "${{ secrets.WX_UPLOAD_PRIVATE_KEY }}" > private.key
env:
UPLOAD_PRIVATE_KEY: ${{ secrets.WX_UPLOAD_PRIVATE_KEY }}
- name: upload
run: npx mp-ci upload
--ver=1.6.8
--desc=更新新闻列表
--pkp=./private.key
# --env=prod
# --env [value] 环境 (default: "dev")
# --type [value] 项目类型 (default: "miniProgram")
# --ver [value] 发布版本号
# --desc [value] 发布简介
# --pkp [value] 私钥文件所在路径
# --proxy [value] 代理url
# --robot [value] 指定CI机器人,1 ~ 30 (default: "1")