✨ feat: 增加context meun功能 #24
Workflow file for this run
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: Publish Release | |
| on: | |
| # 只有推送以 "v" 开头的 tag 时才触发工作流 | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: # 保留手动触发选项 | |
| # push 到 main 分支时触发工作流(可选) | |
| # push: | |
| # branches: [ main ] | |
| # paths-ignore: | |
| # - .github/workflows/* | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| env: | |
| python_ver: 3.11 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.python_ver }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ env.python_ver }} | |
| - name: get version | |
| id: version | |
| uses: notiz-dev/github-action-json-property@release | |
| with: | |
| path: "plugin.json" | |
| prop_path: "Version" | |
| - run: echo ${{steps.version.outputs.prop}} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r ./requirements.txt -t ./lib | |
| zip -r RecentProjectsOpen.zip . -x '*.git*' | |
| - name: Publish | |
| if: success() | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: "RecentProjectsOpen.zip" | |
| tag_name: "v${{steps.version.outputs.prop}}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |