name: CI/CD Pipeline for DevStar Extension on: push: branches: - main pull_request: branches: - main jobs: build: runs-on: ubuntu-latest container: image: node:20-alpine steps: - name: 拉取代码 uses: https://devstar.cn/actions/checkout@v4 with: fetch-depth: 0 - name: 安装依赖 run: | npm install - name: 安装 Git run: | apk add --no-cache git - name: 构建插件 run: | npm run package - name: 发布插件 if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' run: | npm run publish env: VSCE_PAT: ${{ secrets.VSCE_PAT }}