diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 0061a3a4..77d7e1af 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -2,11 +2,11 @@ name: Setup Node description: Setup Node runs: - using: "composite" + using: composite steps: - uses: actions/setup-node@v2 with: - node-version: "16" + node-version: "18" - id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 9f987073..c308827e 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -4,21 +4,22 @@ description: Setup Python inputs: python-version: description: Python version - required: false - default: "3.10" + default: '3.9' runs: - using: "composite" + using: composite steps: - - name: Install poetry - run: pipx install poetry - shell: bash + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: uv.lock - - uses: actions/setup-python@v4 + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} - architecture: "x64" - cache: "poetry" - - run: poetry install -E all - shell: bash + - name: Install the project + run: uv sync --all-extras --dev + shell: bash \ No newline at end of file diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 4dd7602c..118136e5 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -1,12 +1,12 @@ -name: BUILD API +name: Build API on: pull_request: + paths: + "docs/" push: paths: "docs/" - # tags: - # - "v*" workflow_dispatch: jobs: @@ -20,12 +20,8 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: pdm-project/setup-pdm@v4 - name: Setup PDM - with: - python-version: 3.9 - - name: Install dependencies - run: pdm install -dG docs + - name: Setup Python + uses: ./.github/actions/setup-python - name: Remove API Doc run: rm -rf docs/source/pages/api diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 671c53d0..b293a35f 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,4 +1,4 @@ -name: CHANGELOG +name: Generate Changelog on: push: diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 29f19e5a..dc7080bf 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -2,9 +2,9 @@ name: Publish Docker image on: push: - # branches: - # - main - # - master + branches: + - main + - master tags: - 'v*' workflow_dispatch: diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index 63f213f9..7ae0a14b 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -4,6 +4,8 @@ on: push: tags: - "v*" + paths: + - "packages/*" # release: # types: [published] workflow_dispatch: @@ -17,48 +19,19 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: pdm-project/setup-pdm@v4 - name: Setup PDM - with: - python-version: 3.9 - cache: true - - - name: Install dependencies - run: pdm install - - # - run: pdm publish - # shell: bash - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-apscheduler - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-kook - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-cqhttp - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-dingtalk - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-bililive - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-console - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-red - - - run: pdm publish - shell: bash - working-directory: ./packages/iamai-adapter-gensokyo - - + - name: Setup Python + uses: ./.github/actions/setup-python + + - name: Build Packages + run: | + uv build --package iamai-adapter-cqhttp + uv build --package iamai-adapter-apscheduler + uv build --package iamai-adapter-bililive + uv build --package iamai-adapter-console + uv build --package iamai-adapter-dingtalk + uv build --package iamai-adapter-gensokyo + uv build --package iamai-adapter-kook + uv build --package iamai-adapter-red + + - name: Publish Packages + run: uv publish \ No newline at end of file