-
Notifications
You must be signed in to change notification settings - Fork 277
55 lines (53 loc) · 1.68 KB
/
tag-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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