Skip to content

chore(ci): fix auto publish #2

chore(ci): fix auto publish

chore(ci): fix auto publish #2

Workflow file for this run

name: auto-publish

Check failure on line 1 in .github/workflows/auto-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/auto-publish.yml

Invalid workflow file

(Line: 47, Col: 9): Unexpected value 'script'
on:
release:
types: [created]
jobs:
publish-official-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
submodules: recursive
token: ${{ secrets.TDESIGN_BOT_TOKEN }}
- name: update official website
run: |
git config --local user.email "tdesign@tencent.com"
git config --local user.name "tdesign-bot"
git status
git fetch origin
git merge origin/develop
git push origin main
publish-miniprogram:
if: startsWith(github.event.release.tag_name,'tdesign-miniprogram')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 18
- run: pnpm install
- run: pnpm build
- uses: actions/github-script@v7
id: version
script: |
const tagName = '${{ github.event.release.tag_name }}'
const lastIndex = tagName.lastIndexOf('@');
const version = tagName.slice(lastIndex + 1);
core.setOutput('version', version);
- name: release miniprogram
uses: LeeJim/setup-miniprogram@main
with:
project_type: miniProgram
action_type: upload
project_path: ./_example
version: ${{ steps.version.outputs.version }}
es6: true
es7: true
minify: true
env:
MINI_APP_ID: ${{ secrets.TDESIGN_APP_ID }}
MINI_APP_PRIVATE_KEY: ${{ secrets.TDESIGN_MINI_KEY }}