From e369ce6da4d7c029c795f50fd331fd04281bbcb2 Mon Sep 17 00:00:00 2001 From: phi Date: Sun, 25 Aug 2024 16:52:29 +0900 Subject: [PATCH] action test --- .github/workflows/publish.yaml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c39b1b6..989e391 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,8 +1,10 @@ name: Publish Package on: - release: - types: [created] + # release: + # types: [created] + push: + branches: [main] jobs: publish: @@ -10,7 +12,7 @@ jobs: name: "Publish library" strategy: matrix: - python-version: ["3.8"] + python-version: ["3.12"] steps: - name: Check out @@ -19,20 +21,24 @@ jobs: token: "${{ secrets.GITHUB_TOKEN }}" fetch-depth: 0 - - name: Install rye - uses: phi-friday/install-rye@v2 - id: install-rye + - name: Install python + uses: actions/setup-python@v4 + id: install-python with: - python_version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: yezz123/setup-uv@v4 + id: install-uv - name: Build package run: | - rye install dunamai + uv tool install dunamai VERSION=$(dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d") - rye version $VERSION - rye build + uvx --with pdm-bump pdm bump to $VERSION + uvx --from build pyproject-build --installer uv - - name: Release to PyPI - run: | - rye publish --yes \ - --username __token__ --token ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + # - name: Release to PyPI + # run: | + # uvx twine upload dist/* --non-interactive \ + # --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file