Extract the compilation module of Mini Program/Mini Game project code from WeChat Developer Tools to implement one-click npm build/preview/upload Mini Program.
Can run on Cloud Native Build and GitHub Actions.
Before using, you need to access "WeChat Public Platform - Development - Development Settings" with Mini Program administrator privileges to download the code upload key, and disable the IP whitelist to use this plugin for upload and preview operations.
Note: The npm package miniprogram-ci used by this plugin has been
upgraded from 1.8.0 to 2.0.6. You can use tencentcom/miniprogram-ci:v1.8.0 to use the old version of npm package
main:
push:
- stages:
- name: miniprogram-ci
image: tencentcom/miniprogram-ci
settings:
appid: wxsomeappid
# example ./dist
projectPath: the/project/path
# example ./privateKeyPath: private.wx15949dc6d9b035d2.key
privateKeyPath: the/path/to/privatekey
version: v1.0.0
name: CI
on:
push:
branches:
- master
jobs:
scf-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
uses: docker://tencentcom/miniprogram-ci:latest
env:
PLUGIN_APPID: wxsomeappid
PLUGIN_PROJECTPATH: the/project/path
PLUGIN_PRIVATEKEYPATH: the/path/to/privatekey
PLUGIN_VERSION: v1.0.0
For more information, please refer to: package/miniprogram-ci