TAG_PUSH #1452
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: TAG_PUSH | |
on: create | |
jobs: | |
TAG_PUSH: | |
runs-on: ubuntu-latest | |
if: github.event.ref_type == 'tag' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/install-dep | |
with: | |
nodeVersion: '14.6.0' | |
- run: npm run build | |
shell: bash | |
- name: release miniprogram | |
uses: LeeJim/setup-miniprogram@main | |
with: | |
project_type: miniProgram | |
action_type: upload | |
project_path: ./_example | |
version: ${{ github.ref_name }} | |
es6: true | |
es7: true | |
minify: true | |
env: | |
MINI_APP_ID: ${{ secrets.TDESIGN_APP_ID }} | |
MINI_APP_PRIVATE_KEY: ${{ secrets.TDESIGN_MINI_KEY }} | |
- id: publish | |
name: publish NPM | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.TDESIGN_NPM_TOKEN }} | |
tag: ${{ contains(github.ref_name, 'beta') && 'beta' || 'latest' }} | |
- if: steps.publish.outputs.type != 'none' | |
run: | | |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" | |
UPDATE_OFFICIAL_WEBSITE: | |
runs-on: ubuntu-latest | |
if: github.event.ref_type == 'tag' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
token: ${{ secrets.PERSONAL_TOKEN }} | |
submodules: recursive | |
- name: update official website | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git status | |
git fetch origin | |
git merge origin/develop | |
git push origin main |