Skip to content

let替代var

let替代var #47

Workflow file for this run

name: Publish to Tencent Cloud COS
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Build
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build
run: python build.py > index.js
# Test
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: https://registry.npmjs.org/
- name: Install Node.js dependencies
run: npm ci
- name: Run tests
run: npm test
# Publish
- name: Install coscmd
run: sudo pip install coscmd
- name: Configure coscmd
env:
SECRET_ID: ${{ secrets.SecretId }}
SECRET_KEY: ${{ secrets.SecretKey }}
run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b nk2028-1305783649 -r ap-guangzhou
- name: Publish static files to COS
run: coscmd upload -rs --delete -f . /tshet-uinh-examples --ignore '*/.*,*/node_modules/*,./test/*,./build.py,./package.json,./package-lock.json'