From 0acf716105911321da08dd5f3e8c0d7fac157d2d Mon Sep 17 00:00:00 2001 From: nisaji Date: Sat, 28 Dec 2024 15:09:14 +0900 Subject: [PATCH] fix: ci --- .github/workflows/docs.yml | 6 ------ .github/workflows/release.yml | 9 +++++++-- .github/workflows/version-bump.yml | 5 ++--- .gitignore | 3 +++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 511dc9e..d9ebc96 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,9 +42,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - - - name: Update repository description - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh repo edit --homepage "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d8ba52..c39fae3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,8 +30,13 @@ jobs: - name: Install validation dependencies run: pip install tomli - - name: Validate versions - run: python scripts/validate_versions.py + - name: Check version exists on PyPI + run: | + VERSION=$(poetry version -s) + if pip install langrade==$VERSION 2>/dev/null; then + echo "Version $VERSION already exists on PyPI" + exit 1 + fi - name: Build and publish run: poetry publish --build diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 2bd9465..4a69398 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -41,7 +41,6 @@ jobs: current_version=$(poetry version -s) poetry version patch new_version=$(poetry version -s) - sed -i "s/version=\"${current_version}\"/version=\"${new_version}\"/" setup.py - name: Validate versions run: python scripts/validate_versions.py ${{ steps.current_version.outputs.version }} @@ -49,8 +48,8 @@ jobs: - name: Commit and tag run: | new_version=$(poetry version -s) - git add pyproject.toml setup.py - git commit -m "Bump version from ${current_version} to ${new_version}" + git add pyproject.toml + git commit -m "Bump version to ${new_version}" git tag -a "v${new_version}" -m "Release v${new_version}" git push git push --tags diff --git a/.gitignore b/.gitignore index c470085..2a020fb 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ htmlcov/ .DS_Store Thumbs.db +# build +site/ + # Other create_txt.py file_structure_and_contents.txt