feat(tech-seo): 完成技術SEO架構師專屬工作區建立與品質審計 #13
This file contains hidden or 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: 🚀 自動發布 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: 🎯 發布新版本 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 檢出程式碼 | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: 🟢 設定 Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: 📦 安裝依賴 | |
| run: npm ci | |
| - name: 🧪 執行測試 | |
| run: npm test | |
| - name: 🔨 建置專案 | |
| run: npm run build | |
| - name: 🚀 發布新版本 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npx semantic-release | |
| # 注意:版本號檔案更新和 Git 提交由 semantic-release 自動處理 |